aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/components_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-06-21 00:31:43 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-06-21 00:31:43 +0000
commitbbc1351344dd47e88a0251ca9a0f6301301b1202 (patch)
treea1fa53505fef340f160437cc7e37da6ed98825af /actionpack/test/controller/components_test.rb
parentd19e46421cbead18ab1a9f79081b99bf3e97dde5 (diff)
downloadrails-bbc1351344dd47e88a0251ca9a0f6301301b1202.tar.gz
rails-bbc1351344dd47e88a0251ca9a0f6301301b1202.tar.bz2
rails-bbc1351344dd47e88a0251ca9a0f6301301b1202.zip
Determine the correct template_root for deeply nested components. Closes #2841.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4474 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller/components_test.rb')
-rw-r--r--actionpack/test/controller/components_test.rb21
1 files changed, 20 insertions, 1 deletions
diff --git a/actionpack/test/controller/components_test.rb b/actionpack/test/controller/components_test.rb
index d10f7102c2..075bc98a28 100644
--- a/actionpack/test/controller/components_test.rb
+++ b/actionpack/test/controller/components_test.rb
@@ -126,4 +126,23 @@ class ComponentsTest < Test::Unit::TestCase
assert_equal "Lady of the House, speaking", @response.body
end
-end \ No newline at end of file
+end
+
+module A
+ module B
+ module C
+ class NestedController < ActionController::Base
+ # Stub for uses_component_template_root
+ def self.caller
+ ['./test/fixtures/a/b/c/nested_controller.rb']
+ end
+ end
+ end
+ end
+end
+
+class UsesComponentTemplateRootTest < Test::Unit::TestCase
+ def test_uses_component_template_root
+ assert_equal './test/fixtures/', A::B::C::NestedController.uses_component_template_root
+ end
+end