diff options
Diffstat (limited to 'activesupport/test/dependencies_test.rb')
-rw-r--r-- | activesupport/test/dependencies_test.rb | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/activesupport/test/dependencies_test.rb b/activesupport/test/dependencies_test.rb index fe823a9e52..92f3e63e1a 100644 --- a/activesupport/test/dependencies_test.rb +++ b/activesupport/test/dependencies_test.rb @@ -125,20 +125,48 @@ class DependenciesTest < Test::Unit::TestCase end end - def test_directories_should_manifest_as_modules + def test_directories_manifest_as_modules_unless_const_defined with_loading 'autoloading_fixtures' do assert_kind_of Module, ModuleFolder Object.send :remove_const, :ModuleFolder end end - def test_nested_class_access + def test_module_with_nested_class with_loading 'autoloading_fixtures' do assert_kind_of Class, ModuleFolder::NestedClass Object.send :remove_const, :ModuleFolder end end + def test_module_with_nested_inline_class + with_loading 'autoloading_fixtures' do + assert_kind_of Class, ModuleFolder::InlineClass + Object.send :remove_const, :ModuleFolder + end + end + + def test_directories_may_manifest_as_nested_classes + with_loading 'autoloading_fixtures' do + assert_kind_of Class, ClassFolder + Object.send :remove_const, :ClassFolder + end + end + + def test_class_with_nested_class + with_loading 'autoloading_fixtures' do + assert_kind_of Class, ClassFolder::NestedClass + Object.send :remove_const, :ClassFolder + end + end + + def test_class_with_nested_inline_class + with_loading 'autoloading_fixtures' do + assert_kind_of Class, ClassFolder::InlineClass + Object.send :remove_const, :ClassFolder + end + end + def test_nested_class_can_access_sibling with_loading 'autoloading_fixtures' do sibling = ModuleFolder::NestedClass.class_eval "NestedSibling" |