From c1d8ceaf1c37924b7a037ba7f44fbe2dec0eb724 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Thu, 22 Mar 2012 23:47:22 -0300 Subject: [PATCH] Fix more failing tests related to ruby 1.8.7 p358 version change (cherry-picked from commit f748d36b4014418c48553836a56b4bec74e15e49) --- 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 6b144a1..d4bb6f8 100644 --- a/activerecord/test/cases/nested_attributes_test.rb +++ b/activerecord/test/cases/nested_attributes_test.rb @@ -513,9 +513,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.new_record? -- 1.7.1