diff options
author | Emilio Tagua <miloops@gmail.com> | 2011-02-18 15:29:33 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2011-02-18 15:29:33 -0300 |
commit | 0b702ba3de42ed2ae8855843127f898102802b77 (patch) | |
tree | fc7d9b2fd78c3558dd978f3b67e5e58792551668 /activerecord/test/cases/nested_attributes_test.rb | |
parent | 90a850aea4c2c04df22be0aaad1144468fcc8078 (diff) | |
parent | 1644663ba7f678d178deab2bf1629dc05626f85b (diff) | |
download | rails-0b702ba3de42ed2ae8855843127f898102802b77.tar.gz rails-0b702ba3de42ed2ae8855843127f898102802b77.tar.bz2 rails-0b702ba3de42ed2ae8855843127f898102802b77.zip |
Merge remote branch 'rails/master' into identity_map
Conflicts:
activerecord/lib/active_record/associations/association.rb
activerecord/lib/active_record/fixtures.rb
Diffstat (limited to 'activerecord/test/cases/nested_attributes_test.rb')
-rw-r--r-- | activerecord/test/cases/nested_attributes_test.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/test/cases/nested_attributes_test.rb b/activerecord/test/cases/nested_attributes_test.rb index d1afe7376a..c57ab7ed28 100644 --- a/activerecord/test/cases/nested_attributes_test.rb +++ b/activerecord/test/cases/nested_attributes_test.rb @@ -155,7 +155,7 @@ class TestNestedAttributesInGeneral < ActiveRecord::TestCase man = Man.find man.id man.interests_attributes = [{:id => interest.id, :topic => 'gardening'}] assert_equal man.interests.first.topic, man.interests[0].topic - end + end end class TestNestedAttributesOnAHasOneAssociation < ActiveRecord::TestCase @@ -918,16 +918,16 @@ class TestHasManyAutosaveAssociationWhichItselfHasAutosaveAssociations < ActiveR test "if association is not loaded and association record is saved and then in memory record attributes should be saved" do @ship.parts_attributes=[{:id => @part.id,:name =>'Deck'}] - assert_equal 1, @ship.parts.proxy_target.size + assert_equal 1, @ship.association(:parts).target.size assert_equal 'Deck', @ship.parts[0].name end test "if association is not loaded and child doesn't change and I am saving a grandchild then in memory record should be used" do @ship.parts_attributes=[{:id => @part.id,:trinkets_attributes =>[{:id => @trinket.id, :name => 'Ruby'}]}] - assert_equal 1, @ship.parts.proxy_target.size + assert_equal 1, @ship.association(:parts).target.size assert_equal 'Mast', @ship.parts[0].name - assert_no_difference("@ship.parts[0].trinkets.proxy_target.size") do - @ship.parts[0].trinkets.proxy_target.size + assert_no_difference("@ship.parts[0].association(:trinkets).target.size") do + @ship.parts[0].association(:trinkets).target.size end assert_equal 'Ruby', @ship.parts[0].trinkets[0].name @ship.save |