diff options
author | Nicholas Seckar <nseckar@gmail.com> | 2006-12-31 18:53:58 +0000 |
---|---|---|
committer | Nicholas Seckar <nseckar@gmail.com> | 2006-12-31 18:53:58 +0000 |
commit | 91b71ed30cc1c075860c1a098bab5603c3f90178 (patch) | |
tree | 9fda1b6fe4f49cb4de3e28e26c775da3fc49f99e /activesupport/test | |
parent | 54e56ddb6050257966cadbbd5d4d0c9b10f17f8e (diff) | |
download | rails-91b71ed30cc1c075860c1a098bab5603c3f90178.tar.gz rails-91b71ed30cc1c075860c1a098bab5603c3f90178.tar.bz2 rails-91b71ed30cc1c075860c1a098bab5603c3f90178.zip |
Fix Dependencies.autoloaded? to ignore anonymous modules. Closes #6561.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5811 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/dependencies_test.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activesupport/test/dependencies_test.rb b/activesupport/test/dependencies_test.rb index d5c9cb58cb..95a5380dbd 100644 --- a/activesupport/test/dependencies_test.rb +++ b/activesupport/test/dependencies_test.rb @@ -305,6 +305,8 @@ class DependenciesTest < Test::Unit::TestCase assert Dependencies.autoloaded?("::ModuleFolder") assert Dependencies.autoloaded?(:ModuleFolder) + assert ! Dependencies.autoloaded?(Module.new) + Object.send :remove_const, :ModuleFolder end end @@ -705,7 +707,7 @@ class DependenciesTest < Test::Unit::TestCase def test_load_once_constants_should_not_be_unloaded with_loading 'autoloading_fixtures' do Dependencies.load_once_paths = Dependencies.load_paths - ::A + ::A.to_s assert defined?(A) Dependencies.clear assert defined?(A) |