aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-02-18 23:22:15 +0100
committerXavier Noria <fxn@hashref.com>2011-02-18 23:22:15 +0100
commitf41bf6938fd4aa5a83777cc767f7f32ace5f6539 (patch)
treeeb85baf61ec970ca090ed057536c2d0ee1b18e5b /activerecord/test/cases
parentfbfa30a1eeaaab22ac8f43a4137ec8282920fe15 (diff)
parent220cb107b672d65fdc0488d4ff310ab04b62b463 (diff)
downloadrails-f41bf6938fd4aa5a83777cc767f7f32ace5f6539.tar.gz
rails-f41bf6938fd4aa5a83777cc767f7f32ace5f6539.tar.bz2
rails-f41bf6938fd4aa5a83777cc767f7f32ace5f6539.zip
merges docrails
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/autosave_association_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/activerecord/test/cases/autosave_association_test.rb b/activerecord/test/cases/autosave_association_test.rb
index ca59b3d6de..0e93b468c1 100644
--- a/activerecord/test/cases/autosave_association_test.rb
+++ b/activerecord/test/cases/autosave_association_test.rb
@@ -793,6 +793,7 @@ class TestDestroyAsPartOfAutosaveAssociation < ActiveRecord::TestCase
def test_should_destroy_habtm_as_part_of_the_save_transaction_if_they_were_marked_for_destruction
2.times { |i| @pirate.parrots.create!(:name => "parrots_#{i}") }
+<<<<<<< HEAD
assert !@pirate.parrots.any? { |parrot| parrot.marked_for_destruction? }
@pirate.parrots.each { |parrot| parrot.mark_for_destruction }
@@ -808,6 +809,15 @@ class TestDestroyAsPartOfAutosaveAssociation < ActiveRecord::TestCase
def test_should_skip_validation_on_habtm_if_marked_for_destruction
2.times { |i| @pirate.parrots.create!(:name => "parrots_#{i}") }
+=======
+ # Stub the destroy method of the second child to raise an exception
+ class << before.last
+ def destroy(*args)
+ super
+ raise 'Oh noes!'
+ end
+ end
+>>>>>>> 220cb107b672d65fdc0488d4ff310ab04b62b463
@pirate.parrots.each { |parrot| parrot.name = '' }
assert !@pirate.valid?