diff options
author | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-05-01 11:40:32 -0700 |
---|---|---|
committer | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-05-01 17:31:02 -0700 |
commit | 69fd66916566f402620cc385689c36f61deb6ba1 (patch) | |
tree | 33bfe75c95ffa996efe37109bf243714bc4ed96d /actionpack/test/new_base/render_layout_test.rb | |
parent | 4ee3e5b094463383891789f484e927b19fccc744 (diff) | |
download | rails-69fd66916566f402620cc385689c36f61deb6ba1.tar.gz rails-69fd66916566f402620cc385689c36f61deb6ba1.tar.bz2 rails-69fd66916566f402620cc385689c36f61deb6ba1.zip |
Committing the last changes before we start trying to get the old tests to pass on the new base
Diffstat (limited to 'actionpack/test/new_base/render_layout_test.rb')
-rw-r--r-- | actionpack/test/new_base/render_layout_test.rb | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/actionpack/test/new_base/render_layout_test.rb b/actionpack/test/new_base/render_layout_test.rb index 07ea2f191e..5d28926cc6 100644 --- a/actionpack/test/new_base/render_layout_test.rb +++ b/actionpack/test/new_base/render_layout_test.rb @@ -5,12 +5,21 @@ module ControllerLayouts self.view_paths = [ActionView::Template::FixturePath.new( "layouts/application.html.erb" => "OMG <%= yield %> KTHXBAI", - "basic.html.erb" => "Hello world!" + "layouts/override.html.erb" => "Override! <%= yield %>", + "basic.html.erb" => "Hello world!" )] def index render :template => "basic" end + + def override + render :template => "basic", :layout => "override" + end + + def builder_override + + end end class TestImplicitLayout < SimpleRouteCase @@ -41,5 +50,10 @@ module ControllerLayouts assert_status 200 end - + class TestOverridingImplicitLayout < SimpleRouteCase + describe "overriding an implicit layout with render :layout option" + + get "/controller_layouts/implicit/override" + assert_body "Override! Hello world!" + end end
\ No newline at end of file |