aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/autoloading_fixtures/class_folder.rb1
-rw-r--r--activesupport/test/autoloading_fixtures/class_folder/class_folder_subclass.rb3
-rw-r--r--activesupport/test/dependencies_test.rb9
3 files changed, 13 insertions, 0 deletions
diff --git a/activesupport/test/autoloading_fixtures/class_folder.rb b/activesupport/test/autoloading_fixtures/class_folder.rb
index 42933acf28..ad2b27be61 100644
--- a/activesupport/test/autoloading_fixtures/class_folder.rb
+++ b/activesupport/test/autoloading_fixtures/class_folder.rb
@@ -1,2 +1,3 @@
class ClassFolder
+ ConstantInClassFolder = 'indeed'
end
diff --git a/activesupport/test/autoloading_fixtures/class_folder/class_folder_subclass.rb b/activesupport/test/autoloading_fixtures/class_folder/class_folder_subclass.rb
new file mode 100644
index 0000000000..ef66ddaac7
--- /dev/null
+++ b/activesupport/test/autoloading_fixtures/class_folder/class_folder_subclass.rb
@@ -0,0 +1,3 @@
+class ClassFolder::ClassFolderSubclass < ClassFolder
+ ConstantInClassFolder
+end
diff --git a/activesupport/test/dependencies_test.rb b/activesupport/test/dependencies_test.rb
index ec47eb08be..954f2f4a85 100644
--- a/activesupport/test/dependencies_test.rb
+++ b/activesupport/test/dependencies_test.rb
@@ -181,6 +181,15 @@ class DependenciesTest < Test::Unit::TestCase
end
end
+ def test_class_with_nested_inline_subclass_of_parent
+ with_loading 'autoloading_fixtures' do
+ assert_kind_of Class, ClassFolder::ClassFolderSubclass
+ assert_kind_of Class, ClassFolder
+ assert_equal 'indeed', ClassFolder::ClassFolderSubclass::ConstantInClassFolder
+ 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"