diff options
author | Xavier Noria <fxn@hashref.com> | 2012-11-15 11:06:35 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2012-11-15 11:10:03 +0100 |
commit | a8c3ea90f1490da4404aa1cea6fc6209f6b9b99b (patch) | |
tree | abf966f322c9b125e2f2b3a0851767e9bf2ecbbf /activesupport/test/dependencies_test.rb | |
parent | f732f9b7b822c9806cf3e07f127d0771b815500b (diff) | |
download | rails-a8c3ea90f1490da4404aa1cea6fc6209f6b9b99b.tar.gz rails-a8c3ea90f1490da4404aa1cea6fc6209f6b9b99b.tar.bz2 rails-a8c3ea90f1490da4404aa1cea6fc6209f6b9b99b.zip |
let remove_constant still delete Kernel#autoload constants [rounds #8213]
The method #remove_const does not load the file, so we
can still remove the constant.
Diffstat (limited to 'activesupport/test/dependencies_test.rb')
-rw-r--r-- | activesupport/test/dependencies_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/test/dependencies_test.rb b/activesupport/test/dependencies_test.rb index 6e5a6f71e2..67bd6669c5 100644 --- a/activesupport/test/dependencies_test.rb +++ b/activesupport/test/dependencies_test.rb @@ -933,9 +933,9 @@ class DependenciesTest < ActiveSupport::TestCase Object.class_eval do autoload constant, File.expand_path('../autoloading_fixtures/should_not_be_required', __FILE__) end - ActiveSupport::Dependencies.remove_constant(constant) - assert Object.autoload?(constant), "Kernel#autoload of #{constant} has been triggered by remove_const" + assert_nil ActiveSupport::Dependencies.remove_constant(constant), "Kernel#autoload has been triggered by remove_constant" + assert !defined?(ShouldNotBeAutoloaded) end def test_load_once_constants_should_not_be_unloaded |