Permalink
Browse files

fix test with ruby 187-p358

  • Loading branch information...
1 parent 1b4e6ca commit 742b6159d5552c93fd61aeee33e06e10c191af9a @arunagw arunagw committed Feb 18, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 activerecord/test/cases/nested_attributes_test.rb
View
6 activerecord/test/cases/nested_attributes_test.rb
@@ -624,9 +624,13 @@ def test_should_raise_RecordNotFound_if_an_id_is_given_but_doesnt_return_a_recor
end
def test_should_automatically_build_new_associated_models_for_each_entry_in_a_hash_where_the_id_is_missing
+ attributes = ActiveSupport::OrderedHash.new
+ attributes['foo'] = { :name => 'Grace OMalley' }
+ attributes['bar'] = { :name => 'Privateers Greed' }
+
@pirate.send(@association_name).destroy_all
@pirate.reload.attributes = {
- association_getter => { 'foo' => { :name => 'Grace OMalley' }, 'bar' => { :name => 'Privateers Greed' }}
+ association_getter => attributes
}
assert !@pirate.send(@association_name).first.persisted?

0 comments on commit 742b615

Please sign in to comment.