diff options
author | Rick Olson <technoweenie@gmail.com> | 2007-04-12 17:11:48 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2007-04-12 17:11:48 +0000 |
commit | f5b8fc0335d4f5e4e5a3c7d7e4dab14e449403cc (patch) | |
tree | 415e4de1b7a8cd89dff0b284afb9137661e1c607 /actionpack/test/controller | |
parent | d699084f7a050b1aaffe81ce0be84d72e2530eb7 (diff) | |
download | rails-f5b8fc0335d4f5e4e5a3c7d7e4dab14e449403cc.tar.gz rails-f5b8fc0335d4f5e4e5a3c7d7e4dab14e449403cc.tar.bz2 rails-f5b8fc0335d4f5e4e5a3c7d7e4dab14e449403cc.zip |
Allow layouts with extension of .html.erb. Closes #8032 [Josh Knowles]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6516 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/layout_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/controller/layout_test.rb b/actionpack/test/controller/layout_test.rb index edf8f44b3a..5689ed0711 100644 --- a/actionpack/test/controller/layout_test.rb +++ b/actionpack/test/controller/layout_test.rb @@ -28,6 +28,9 @@ end class ControllerNameSpace::NestedController < LayoutTest end +class MultipleExtensions < LayoutTest +end + class MabView def initialize(view) end @@ -72,6 +75,13 @@ class LayoutAutoDiscoveryTest < Test::Unit::TestCase assert_equal 'layouts/controller_name_space/nested', @controller.active_layout assert_equal 'controller_name_space/nested.rhtml hello.rhtml', @response.body end + + def test_namespaced_controllers_auto_detect_layouts + @controller = MultipleExtensions.new + get :hello + assert_equal 'layouts/multiple_extensions', @controller.active_layout + assert_equal 'multiple_extensions.html.erb hello.rhtml', @response.body.strip + end end class ExemptFromLayoutTest < Test::Unit::TestCase |