diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-05-22 16:59:55 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-05-22 16:59:55 +0000 |
commit | c41f0cc720f732c6794118762ac4f7f7f8a0ef48 (patch) | |
tree | f283f5494cfedbb7f3139baeeb0939a0225d7d9b | |
parent | bdd16a75e6ee5ec420bec1ca441e97b403dfb9d4 (diff) | |
download | rails-c41f0cc720f732c6794118762ac4f7f7f8a0ef48.tar.gz rails-c41f0cc720f732c6794118762ac4f7f7f8a0ef48.tar.bz2 rails-c41f0cc720f732c6794118762ac4f7f7f8a0ef48.zip |
Test for no layout on nothing
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1354 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | actionpack/test/controller/new_render_test.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/actionpack/test/controller/new_render_test.rb b/actionpack/test/controller/new_render_test.rb index ee971c3b78..ba4a5f7ec3 100644 --- a/actionpack/test/controller/new_render_test.rb +++ b/actionpack/test/controller/new_render_test.rb @@ -58,6 +58,10 @@ class TestController < ActionController::Base render :action => "hello_world", :layout => false end + def rendering_nothing_on_layout + render :nothing => true + end + def builder_layout_test render :action => "hello" end @@ -85,7 +89,7 @@ class TestController < ActionController::Base private def determine_layout case action_name - when "layout_test", "rendering_without_layout" + when "layout_test", "rendering_without_layout", "rendering_nothing_on_layout" "layouts/standard" when "builder_layout_test" "layouts/builder" @@ -199,6 +203,11 @@ class RenderTest < Test::Unit::TestCase assert_equal "Hello world!", process_request.body end + def test_rendering_nothing_on_layout + @request.action = "rendering_nothing_on_layout" + assert_equal "", process_request.body + end + def test_render_xml_with_layouts @request.action = "builder_layout_test" assert_equal "<wrapper>\n<html>\n <p>Hello </p>\n<p>This is grand!</p>\n</html>\n</wrapper>\n", process_request.body |