diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-07-24 11:58:26 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-07-24 11:58:26 -0500 |
commit | 3fd9036fc554979e951422a79f0f77f061112bdc (patch) | |
tree | 13704c4e6a1d8690fd11ef1f06573c307d18629e /activesupport/test | |
parent | 55adaa2efc08c892bf7be55d79ac571848068256 (diff) | |
download | rails-3fd9036fc554979e951422a79f0f77f061112bdc.tar.gz rails-3fd9036fc554979e951422a79f0f77f061112bdc.tar.bz2 rails-3fd9036fc554979e951422a79f0f77f061112bdc.zip |
Added config.dependency_loading to enable or disable the dependency loader after initialization
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/dependencies_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/activesupport/test/dependencies_test.rb b/activesupport/test/dependencies_test.rb index 038547a862..39c9c74c94 100644 --- a/activesupport/test/dependencies_test.rb +++ b/activesupport/test/dependencies_test.rb @@ -762,4 +762,16 @@ class DependenciesTest < Test::Unit::TestCase ensure ActiveSupport::Dependencies.load_once_paths = [] end + + def test_hook_called_multiple_times + assert_nothing_raised { 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 |