Just did an svn update and I'm getting a failing test:
test_unabstracted_database_dependent_types(MigrationTest):
NoMethodError: undefined method `intelligence_quotient=' for #<Person:
0x25cb390>
./test/../lib/active_record/attribute_methods.rb:175:in
`method_missing'
./test/../lib/active_record/base.rb:1829:in `attributes='
./test/../lib/active_record/base.rb:1828:in `attributes='
./test/../lib/active_record/base.rb:1655:in `initialize'
./test/../lib/active_record/base.rb:458:in `create'
./test/migration_test.rb:337:in
`test_unabstracted_database_dependent_types'
/usr/local/lib/ruby/gems/1.8/gems/mocha-0.5.3/lib/mocha/
test_case_adapter.rb:19:in `run'
The test in question reads:
def test_unabstracted_database_dependent_types
Person.delete_all
ActiveRecord::Migration.add_column :people, :intelligence_quotient, :tin
yint
Person.create :intelligence_quotient => 300
jonnyg = Person.find(:first)
assert_equal 127, jonnyg.intelligence_quotient
jonnyg.destroy
ensure
ActiveRecord::Migration.remove_column :people, :intelligece_quotient
rescue nil
end
I think this just needs a Person.reset_column_information after the
migration
Fred
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---