From e4c047e4891c446024e35548e872704d132ad2f7 Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Wed, 1 Jun 2005 13:39:58 +0000 Subject: render(:action) and render() are the only two render calls to use a layout by default. All others default to :layout => false. Also, allow :layout => true to be a synonym for :layout => nil. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1378 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/new_render_test.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'actionpack/test/controller/new_render_test.rb') diff --git a/actionpack/test/controller/new_render_test.rb b/actionpack/test/controller/new_render_test.rb index a51bd2a83e..9ec3f283cf 100644 --- a/actionpack/test/controller/new_render_test.rb +++ b/actionpack/test/controller/new_render_test.rb @@ -78,7 +78,7 @@ class NewRenderTestController < ActionController::Base end def partial_only_with_layout - render :partial => "partial_only", :layout => nil + render :partial => "partial_only", :layout => true end def hello_in_a_string @@ -99,7 +99,7 @@ class NewRenderTestController < ActionController::Base private def determine_layout case action_name - when "layout_test", "rendering_without_layout", + when "hello_world", "layout_test", "rendering_without_layout", "rendering_nothing_on_layout", "render_text_hello_world", "partial_only", "partial_only_with_layout", "accessing_params_in_template", @@ -132,6 +132,7 @@ class NewRenderTest < Test::Unit::TestCase get :hello_world assert_response :success assert_template "test/hello_world" + assert_equal "Hello world!", @response.body end def test_do_with_render -- cgit v1.2.3