aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/layout_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/layout_test.rb')
-rw-r--r--actionpack/test/controller/layout_test.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/actionpack/test/controller/layout_test.rb b/actionpack/test/controller/layout_test.rb
index 57eb1f73b1..cffd4d388e 100644
--- a/actionpack/test/controller/layout_test.rb
+++ b/actionpack/test/controller/layout_test.rb
@@ -20,6 +20,12 @@ end
class ThirdPartyTemplateLibraryController < LayoutTest
end
+module ControllerNameSpace
+end
+
+class ControllerNameSpace::NestedController < LayoutTest
+end
+
class MabView
def initialize(view)
end
@@ -57,5 +63,12 @@ class LayoutAutoDiscoveryTest < Test::Unit::TestCase
assert_equal 'layouts/third_party_template_library', @controller.active_layout
assert_equal 'Mab', @response.body
end
+
+ def test_namespaced_controllers_auto_detect_layouts
+ @controller = ControllerNameSpace::NestedController.new
+ get :hello
+ assert_equal 'layouts/controller_name_space/nested', @controller.active_layout
+ assert_equal 'controller_name_space/nested.rhtml hello.rhtml', @response.body
+ end
end \ No newline at end of file