Delete AS::Dependencies.hook!

This commit is contained in:
Xavier Noria 2021-04-18 18:44:14 +02:00
parent dfef44716a
commit 2a22b4c53b
3 changed files with 0 additions and 25 deletions

@ -46,8 +46,6 @@ def self.require_helpers(helpers_dirs)
ActionPackTestSuiteUtils.require_helpers("#{__dir__}/fixtures/helpers")
ActionPackTestSuiteUtils.require_helpers("#{__dir__}/fixtures/alternate_helpers")
ActiveSupport::Dependencies.hook!
Thread.abort_on_exception = true
# Show backtraces for deprecated behavior for quicker cleanup.

@ -293,11 +293,6 @@ def require(file)
end
end
def hook!
Loadable.include_into(Object)
ModuleConstMissing.include_into(Module)
end
def unhook!
ModuleConstMissing.exclude_from(Module)
Loadable.exclude_from(Object)
@ -697,5 +692,3 @@ def real_mod_name(mod)
end
end
end
ActiveSupport::Dependencies.hook!

@ -98,22 +98,6 @@ def test_new_constants_in_with_illegal_module_name_raises_correct_error
ActiveSupport::Dependencies.new_constants_in("Illegal-Name") { }
end
end
def test_hook_called_multiple_times
assert_nothing_raised { ActiveSupport::Dependencies.hook! }
end
def test_load_and_require_stay_private
assert_includes Object.private_methods, :load
assert_includes Object.private_methods, :require
ActiveSupport::Dependencies.unhook!
assert_includes Object.private_methods, :load
assert_includes Object.private_methods, :require
ensure
ActiveSupport::Dependencies.hook!
end
end
class RequireDependencyTest < ActiveSupport::TestCase