diff options
author | Jamis Buck <jamis@37signals.com> | 2005-06-01 13:39:58 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2005-06-01 13:39:58 +0000 |
commit | e4c047e4891c446024e35548e872704d132ad2f7 (patch) | |
tree | 0086e3c6c70d3276aeef027aac126bb3ea7d2220 /actionpack/test | |
parent | 46e68538c08d751554b2c6f512659993ef62c218 (diff) | |
download | rails-e4c047e4891c446024e35548e872704d132ad2f7.tar.gz rails-e4c047e4891c446024e35548e872704d132ad2f7.tar.bz2 rails-e4c047e4891c446024e35548e872704d132ad2f7.zip |
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
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/new_render_test.rb | 5 |
1 files changed, 3 insertions, 2 deletions
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 "<html>Hello world!</html>", @response.body end def test_do_with_render |