diff options
Diffstat (limited to 'activerecord/test')
-rwxr-xr-x | activerecord/test/lifecycle_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/lifecycle_test.rb b/activerecord/test/lifecycle_test.rb index 4f12a3161c..d6c017672d 100755 --- a/activerecord/test/lifecycle_test.rb +++ b/activerecord/test/lifecycle_test.rb @@ -5,6 +5,7 @@ require 'fixtures/reply' class Topic; def after_find() end end class Developer; def after_find() end end +class SpecialDeveloper < Developer; end class TopicManualObserver include Singleton @@ -105,4 +106,11 @@ class LifecycleTest < Test::Unit::TestCase developer = Developer.find(1) assert_equal multi_observer.record.name, developer.name end + + def test_observing_subclasses + multi_observer = MultiObserver.instance + + developer = SpecialDeveloper.find(1) + assert_equal multi_observer.record.name, developer.name + end end |