提交 6ed5d515 编写于 作者: R Rafael Mendonça França

Merge pull request #8491 from igagnidz/master

Issue #8442
......@@ -4,4 +4,14 @@
class DescendantsTrackerWithoutAutoloadingTest < ActiveSupport::TestCase
include DescendantsTrackerTestCases
def test_clear_without_autoloaded_singleton_parent
mark_as_autoloaded do
parent_instance = Parent.new
parent_instance.singleton_class.descendants #adds singleton class in @@direct_descendants
ActiveSupport::DescendantsTracker.clear #clear is supposed to remove singleton class keys so GC can remove them.
assert !ActiveSupport::DescendantsTracker.class_variable_get(:@@direct_descendants).keys.include?(parent_instance.singleton_class)
end
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册