diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-19 16:34:34 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-19 16:34:34 +0000 |
commit | 6f95c49a15e85c007e9c94c107232f9fee600aa8 (patch) | |
tree | 09781621c7c135bd6f07a29ce8fd02622aaf9d85 /activerecord/test | |
parent | 9cc624df73d26c0ea4065e295cad0ae30ee6d707 (diff) | |
download | rails-6f95c49a15e85c007e9c94c107232f9fee600aa8.tar.gz rails-6f95c49a15e85c007e9c94c107232f9fee600aa8.tar.bz2 rails-6f95c49a15e85c007e9c94c107232f9fee600aa8.zip |
Fixed that Observers didn't observe sub-classes #627 [Florian Weber]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2263 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
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 |