diff options
author | Arun Agrawal <arunagw@gmail.com> | 2012-02-18 15:47:24 +0530 |
---|---|---|
committer | Arun Agrawal <arunagw@gmail.com> | 2012-02-18 15:47:24 +0530 |
commit | 742b6159d5552c93fd61aeee33e06e10c191af9a (patch) | |
tree | 5db9843a6ced21e33334e2aa7c675479514900e1 /activerecord | |
parent | 1b4e6ca9d86ef39f17feef50e525f96706a8fc09 (diff) | |
download | rails-742b6159d5552c93fd61aeee33e06e10c191af9a.tar.gz rails-742b6159d5552c93fd61aeee33e06e10c191af9a.tar.bz2 rails-742b6159d5552c93fd61aeee33e06e10c191af9a.zip |
fix test with ruby 187-p358
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/nested_attributes_test.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/activerecord/test/cases/nested_attributes_test.rb b/activerecord/test/cases/nested_attributes_test.rb index 2ae9cb4888..15c45ca60e 100644 --- a/activerecord/test/cases/nested_attributes_test.rb +++ b/activerecord/test/cases/nested_attributes_test.rb @@ -624,9 +624,13 @@ module NestedAttributesOnACollectionAssociationTests 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? |