1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Delete the classic version of AS::Dependencies.clear

This commit is contained in:
Xavier Noria 2021-08-23 09:25:27 +02:00
parent 08481be86e
commit 7bbe1f4bce
2 changed files with 0 additions and 23 deletions

View file

@ -62,9 +62,6 @@ module ActiveSupport # :nodoc:
# main autoloader. Used to clear state. # main autoloader. Used to clear state.
mattr_accessor :_autoloaded_tracked_classes, default: Set.new mattr_accessor :_autoloaded_tracked_classes, default: Set.new
def clear
end
# Search for a file in autoload_paths matching the provided suffix. # Search for a file in autoload_paths matching the provided suffix.
def search_for_file(path_suffix) def search_for_file(path_suffix)
path_suffix += ".rb" unless path_suffix.end_with?(".rb") path_suffix += ".rb" unless path_suffix.end_with?(".rb")

View file

@ -16,26 +16,6 @@ module ModuleWithConstant
InheritedConstant = "Hello" InheritedConstant = "Hello"
end end
class DependenciesTest < ActiveSupport::TestCase
setup do
@loaded_features_copy = $LOADED_FEATURES.dup
$LOAD_PATH << "test"
end
teardown do
ActiveSupport::Dependencies.clear
$LOADED_FEATURES.replace(@loaded_features_copy)
$LOAD_PATH.pop
end
def test_smart_name_error_strings
e = assert_raise NameError do
Object.module_eval "ImaginaryObject"
end
assert_includes "uninitialized constant ImaginaryObject", e.message
end
end
class RequireDependencyTest < ActiveSupport::TestCase class RequireDependencyTest < ActiveSupport::TestCase
setup do setup do
@loaded_features_copy = $LOADED_FEATURES.dup @loaded_features_copy = $LOADED_FEATURES.dup