aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2016-02-19 14:29:55 -0200
committerRafael França <rafaelmfranca@gmail.com>2016-02-19 14:29:55 -0200
commitbe08291ebfc247e3357c221f0a06bc91cd5e52d4 (patch)
tree2f0f26d58a12fb7d55b9cb751cd095c0b143cab7 /activesupport/test
parent2a83a6e87851d2184093ca107b4574fd1c4a658a (diff)
parent1cfeab531454d5e82db0d1b26a3ad86e3a4a6e30 (diff)
downloadrails-be08291ebfc247e3357c221f0a06bc91cd5e52d4.tar.gz
rails-be08291ebfc247e3357c221f0a06bc91cd5e52d4.tar.bz2
rails-be08291ebfc247e3357c221f0a06bc91cd5e52d4.zip
Merge pull request #23777 from sruli/activesupport_dependencies_cleanup
Dependencies clean up
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/dependencies_test.rb13
1 files changed, 3 insertions, 10 deletions
diff --git a/activesupport/test/dependencies_test.rb b/activesupport/test/dependencies_test.rb
index 757e600646..b7a5747f1b 100644
--- a/activesupport/test/dependencies_test.rb
+++ b/activesupport/test/dependencies_test.rb
@@ -76,6 +76,7 @@ class DependenciesTest < ActiveSupport::TestCase
def test_dependency_which_raises_exception_isnt_added_to_loaded_set
with_loading do
filename = 'dependencies/raises_exception'
+ expanded = File.expand_path(filename)
$raises_exception_load_count = 0
5.times do |count|
@@ -86,8 +87,8 @@ class DependenciesTest < ActiveSupport::TestCase
assert_equal 'Loading me failed, so do not add to loaded or history.', e.message
assert_equal count + 1, $raises_exception_load_count
- assert_not ActiveSupport::Dependencies.loaded.include?(filename)
- assert_not ActiveSupport::Dependencies.history.include?(filename)
+ assert_not ActiveSupport::Dependencies.loaded.include?(expanded)
+ assert_not ActiveSupport::Dependencies.history.include?(expanded)
end
end
end
@@ -1047,12 +1048,4 @@ class DependenciesTest < ActiveSupport::TestCase
ensure
ActiveSupport::Dependencies.hook!
end
-
- def test_unhook
- ActiveSupport::Dependencies.unhook!
- assert !Module.new.respond_to?(:const_missing_without_dependencies)
- assert !Module.new.respond_to?(:load_without_new_constant_marking)
- ensure
- ActiveSupport::Dependencies.hook!
- end
end