class DescendantsTrackerWithoutAutoloadingTest
Public Instance Methods
test_clear_without_autoloaded_singleton_parent()
click to toggle source
Regression test for #8422. github.com/quails/quails/issues/8442
# File activesupport/test/descendants_tracker_without_autoloading_test.rb, line 11 def test_clear_without_autoloaded_singleton_parent mark_as_autoloaded do parent_instance = Parent.new parent_instance.singleton_class.descendants ActiveSupport::DescendantsTracker.clear assert !ActiveSupport::DescendantsTracker.class_variable_get(:@@direct_descendants).key?(parent_instance.singleton_class) end end