Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Test autoloading nested subclass of parent.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5541 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 615d05f5de8f401fa29bb33f37903ed602a6879a 1 parent 1d31a04
@jeremy jeremy authored
View
1  activesupport/test/autoloading_fixtures/class_folder.rb
@@ -1,2 +1,3 @@
class ClassFolder
+ ConstantInClassFolder = 'indeed'
end
View
3  activesupport/test/autoloading_fixtures/class_folder/class_folder_subclass.rb
@@ -0,0 +1,3 @@
+class ClassFolder::ClassFolderSubclass < ClassFolder
+ ConstantInClassFolder
+end
View
9 activesupport/test/dependencies_test.rb
@@ -181,6 +181,15 @@ def test_class_with_nested_inline_class
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"
Please sign in to comment.
Something went wrong with that request. Please try again.