|
I have just reproduced this with jruby-1.5.6 and the following. activerecord (3.0.4)
activemodel (= 3.0.4)
activesupport (= 3.0.4)
arel (~> 2.0.2)
tzinfo (~> 0.3.23)
activerecord-jdbc-adapter (1.1.1)
activerecord-jdbcmysql-adapter (1.1.1)
activerecord-jdbc-adapter (= 1.1.1)
jdbc-mysql (~> 5.1.0)
activerecord-jdbcsqlite3-adapter (1.1.1)
activerecord-jdbc-adapter (= 1.1.1)
jdbc-sqlite3 (~> 3.6.0)
My test: describe DatabaseDefinition do before(:each) do @dd_attributes = {:name => "MyDatabase", :url => "some_url://somewhere:3306/"} end it "should validate uniqueness of :name" do DatabaseDefinition.create!(@dd_attributes) database_definition = DatabaseDefinition.create(@dd_attributes) database_definition.should_not be_valid database_definition.errors[:url].should be_empty database_definition.errors[:name].should_not be_empty end end Test passes under ruby-1.8.7 but fails under jruby-1.5.6. This must be an environmental issue. I can no longer reproduce. I omitted from last report: jdbc-sqlite3 (3.6.14.2.056) Dropping the database and migrating did not appear to help. I switched to jruby-1.5.5 using RVM, bundle install, bundle exec db:drop clean, bundle exec rake, and tests pass. Switching back to jruby-1.5.6 and now bundle exec rake and tests pass. This doesn't warrant additional investigation until I can come up a pattern for reproducing. |
|||||||||||||||||||||||||||||||||||||||||||
It looks like we have tests to cover this in sqlite3 in 0.9.2, so please try this again when the release comes out.