aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/core_ext/object_and_class_ext_test.rb46
1 files changed, 0 insertions, 46 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 29b2f2fc8b..29e18d5ae1 100644
--- a/activesupport/test/core_ext/object_and_class_ext_test.rb
+++ b/activesupport/test/core_ext/object_and_class_ext_test.rb
@@ -5,27 +5,6 @@ class ClassA; end
class ClassB < ClassA; end
class ClassC < ClassB; end
class ClassD < ClassA; end
-class RemoveSubsTestClass; end
-class RemoveSubsBaseClass
- def self.add_ivar
- @ivar = RemoveSubsTestClass.new
- end
-end
-class RemoveSubsSubClass < RemoveSubsBaseClass; end
-class RemoveSubsTestClass2; end
-class RemoveSubsBaseClass2
- def self.add_ivar
- @ivar = RemoveSubsTestClass2.new
- end
-end
-class RemoveSubsSubClass2 < RemoveSubsBaseClass2; end
-class RemoveSubsTestClass3; end
-class RemoveSubsBaseClass3
- def self.add_ivar
- @ivar = RemoveSubsTestClass3.new
- end
-end
-class RemoveSubsSubClass3 < RemoveSubsBaseClass3; end
class ClassExtTest < Test::Unit::TestCase
def test_methods
@@ -51,29 +30,4 @@ class ObjectTests < Test::Unit::TestCase
suppress(LoadError, ArgumentError) { raise LoadError }
suppress(LoadError, ArgumentError) { raise ArgumentError }
end
-
- def test_remove_subclasses_of_unsets_ivars
- r = RemoveSubsSubClass.new
- RemoveSubsSubClass.add_ivar
- RemoveSubsBaseClass.remove_subclasses
-
- GC.start
- ObjectSpace.each_object do |o|
- flunk("ObjectSpace still contains RemoveSubsTestClass") if o.class == RemoveSubsTestClass
- end
- end
-
- def test_remove_subclasses_of_multiple_classes_unsets_ivars
- r2 = RemoveSubsSubClass2.new
- RemoveSubsSubClass2.add_ivar
- r3 = RemoveSubsSubClass3.new
- RemoveSubsSubClass3.add_ivar
-
- Object.remove_subclasses_of(RemoveSubsBaseClass2, RemoveSubsBaseClass3)
-
- GC.start
- ObjectSpace.each_object do |o|
- flunk("ObjectSpace still contains RemoveSubsTestClass") if o.class == RemoveSubsTestClass
- end
- end
end