diff options
author | Yehuda Katz <yehudakatz@YK.local> | 2010-02-10 15:06:42 -0800 |
---|---|---|
committer | Yehuda Katz <yehudakatz@YK.local> | 2010-02-10 15:06:42 -0800 |
commit | 77f630d3171d8c0d6b89321276bfed2adf46f4c4 (patch) | |
tree | 2f3da83edf58263bc4e7c2b43adf2ec6cc086f3e | |
parent | a3eaaf6b50b76a51080ec9ae6b217095868f3054 (diff) | |
download | rails-77f630d3171d8c0d6b89321276bfed2adf46f4c4.tar.gz rails-77f630d3171d8c0d6b89321276bfed2adf46f4c4.tar.bz2 rails-77f630d3171d8c0d6b89321276bfed2adf46f4c4.zip |
Since require_dependency cannot be cleared, remove the dependencies
-rw-r--r-- | activesupport/test/dependencies_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/test/dependencies_test.rb b/activesupport/test/dependencies_test.rb index f782313411..849f68c145 100644 --- a/activesupport/test/dependencies_test.rb +++ b/activesupport/test/dependencies_test.rb @@ -42,12 +42,17 @@ class DependenciesTest < Test::Unit::TestCase require_dependency 'dependencies/service_one' require_dependency 'dependencies/service_two' assert_equal 2, ActiveSupport::Dependencies.loaded.size + ensure + Object.send(:remove_const, :ServiceOne) if Object.const_defined?(:ServiceOne) + Object.send(:remove_const, :ServiceTwo) if Object.const_defined?(:ServiceTwo) end def test_tracking_identical_loaded_files require_dependency 'dependencies/service_one' require_dependency 'dependencies/service_one' assert_equal 1, ActiveSupport::Dependencies.loaded.size + ensure + Object.send(:remove_const, :ServiceOne) if Object.const_defined?(:ServiceOne) end def test_missing_dependency_raises_missing_source_file |