diff options
Diffstat (limited to 'activesupport/test/dependencies_test.rb')
-rw-r--r-- | activesupport/test/dependencies_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/activesupport/test/dependencies_test.rb b/activesupport/test/dependencies_test.rb index 755cff2e3f..ad3472bddb 100644 --- a/activesupport/test/dependencies_test.rb +++ b/activesupport/test/dependencies_test.rb @@ -9,6 +9,10 @@ module ModuleWithMissing end end +module ModuleWithConstant + InheritedConstant = "Hello" +end + class DependenciesTest < Test::Unit::TestCase def teardown Dependencies.clear @@ -574,6 +578,13 @@ class DependenciesTest < Test::Unit::TestCase Object.send :remove_const, :M rescue nil end + def test_new_constants_in_with_inherited_constants + m = Dependencies.new_constants_in(:Object) do + Object.send :include, ModuleWithConstant + end + assert_equal [], m + end + def test_file_with_multiple_constants_and_require_dependency with_loading 'autoloading_fixtures' do assert ! defined?(MultipleConstantFile) |