Delete AS::Dependencies.hook!
This commit is contained in:
parent
dfef44716a
commit
2a22b4c53b
|
@ -46,8 +46,6 @@ end
|
|||
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 @@ module ActiveSupport # :nodoc:
|
|||
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 @@ module ActiveSupport # :nodoc:
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
ActiveSupport::Dependencies.hook!
|
||||
|
|
|
@ -98,22 +98,6 @@ class DependenciesTest < ActiveSupport::TestCase
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue