aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/object_and_class_ext_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/core_ext/object_and_class_ext_test.rb')
-rw-r--r--activesupport/test/core_ext/object_and_class_ext_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/object_and_class_ext_test.rb b/activesupport/test/core_ext/object_and_class_ext_test.rb
index 5d7a06d08d..6a100e813b 100644
--- a/activesupport/test/core_ext/object_and_class_ext_test.rb
+++ b/activesupport/test/core_ext/object_and_class_ext_test.rb
@@ -7,6 +7,9 @@ class ClassB < ClassA; end
class ClassC < ClassB; end
class ClassD < ClassA; end
+class ClassI; end
+class ClassJ < ClassI; end
+
module Bar
def bar; end
end
@@ -31,6 +34,12 @@ class ClassExtTest < Test::Unit::TestCase
assert !defined?(ClassC)
assert !defined?(ClassD)
end
+
+ def test_subclasses_of
+ assert_equal [ClassJ], Object.subclasses_of(ClassI)
+ ClassI.remove_subclasses
+ assert_equal [], Object.subclasses_of(ClassI)
+ end
end
class ObjectTests < Test::Unit::TestCase