diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-11-03 19:57:35 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-11-03 19:57:35 -0200 |
commit | 7c3bc58b54c68245b8abf8a41a9a9a4f7339e5c6 (patch) | |
tree | a6d2c014cb3d6610975cc1004295eb62d06cfc4e /activerecord/test/cases | |
parent | 66bcaff0620e0b4ba1c7cc711f356007a65d12ec (diff) | |
download | rails-7c3bc58b54c68245b8abf8a41a9a9a4f7339e5c6.tar.gz rails-7c3bc58b54c68245b8abf8a41a9a9a4f7339e5c6.tar.bz2 rails-7c3bc58b54c68245b8abf8a41a9a9a4f7339e5c6.zip |
Ensure nested attributes is restored in case of a test failure
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/nested_attributes_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/nested_attributes_test.rb b/activerecord/test/cases/nested_attributes_test.rb index 533920fe8c..9674f2ce94 100644 --- a/activerecord/test/cases/nested_attributes_test.rb +++ b/activerecord/test/cases/nested_attributes_test.rb @@ -489,7 +489,7 @@ class TestNestedAttributesOnABelongsToAssociation < ActiveRecord::TestCase @ship.update_attributes(:pirate_attributes => { :id => @ship.pirate.id, :_destroy => '1' }) assert_nothing_raised(ActiveRecord::RecordNotFound) { @ship.pirate.reload } - + ensure Ship.accepts_nested_attributes_for :pirate, :allow_destroy => true, :reject_if => proc { |attributes| attributes.empty? } end |