From e32e86e59c9d8e9971245a8820222c27573ee1b2 Mon Sep 17 00:00:00 2001 From: Marcelo Giorgi Date: Thu, 12 Aug 2010 23:13:27 -0300 Subject: [PATCH] Test to exercise Callback#reset_callbacks for descendants [#5372 state: resolved] --- activesupport/test/callbacks_test.rb | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/activesupport/test/callbacks_test.rb b/activesupport/test/callbacks_test.rb index 70a2950..fb8cc16 100644 --- a/activesupport/test/callbacks_test.rb +++ b/activesupport/test/callbacks_test.rb @@ -180,6 +180,9 @@ module CallbacksTest end class CleanPerson < ConditionalPerson + + class ::CleanPersonChild < self; end + reset_callbacks :save end @@ -358,6 +361,12 @@ module CallbacksTest person.save assert_equal [], person.history end + + def test_reset_save_child_person + person = CleanPersonChild.new + person.save + assert_equal [], person.history + end end class CallbackTerminator -- 1.7.0.4