diff options
author | Emilio Tagua <miloops@gmail.com> | 2009-05-12 16:13:00 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2009-05-12 16:13:00 -0300 |
commit | 0048897a417774f7e5a0c8c9e82fc8684f94ebc1 (patch) | |
tree | 8df248dab434bdaac61ea60249d4630958260eed /actionpack/test/new_base/render_layout_test.rb | |
parent | 6c7d8cb8ac9e6b6775e9a54ef0be62dbaab592f5 (diff) | |
parent | 22c5667c2ef46d6723c1805d3adc52dc8e92429b (diff) | |
download | rails-0048897a417774f7e5a0c8c9e82fc8684f94ebc1.tar.gz rails-0048897a417774f7e5a0c8c9e82fc8684f94ebc1.tar.bz2 rails-0048897a417774f7e5a0c8c9e82fc8684f94ebc1.zip |
Merge commit 'rails/master'
Diffstat (limited to 'actionpack/test/new_base/render_layout_test.rb')
-rw-r--r-- | actionpack/test/new_base/render_layout_test.rb | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/actionpack/test/new_base/render_layout_test.rb b/actionpack/test/new_base/render_layout_test.rb index facf67ea85..5d28926cc6 100644 --- a/actionpack/test/new_base/render_layout_test.rb +++ b/actionpack/test/new_base/render_layout_test.rb @@ -3,14 +3,23 @@ require File.join(File.expand_path(File.dirname(__FILE__)), "test_helper") module ControllerLayouts class ImplicitController < ::ApplicationController - self.view_paths = [ActionView::FixtureTemplate::FixturePath.new( + 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 @@ -23,7 +32,7 @@ module ControllerLayouts class ImplicitNameController < ::ApplicationController - self.view_paths = [ActionView::FixtureTemplate::FixturePath.new( + self.view_paths = [ActionView::Template::FixturePath.new( "layouts/controller_layouts/implicit_name.html.erb" => "OMGIMPLICIT <%= yield %> KTHXBAI", "basic.html.erb" => "Hello world!" )] @@ -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 |