aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2012-12-02 16:26:11 +0100
committerYves Senn <yves.senn@gmail.com>2012-12-02 16:26:45 +0100
commit60b525c751a2407712d8ea1854b9b31f68a31406 (patch)
treed15288640a14018595f11f19dd133c5de8c3c5a9 /actionpack/test
parent77306550737b2dd7cecf628c50951b2d75ef2e31 (diff)
downloadrails-60b525c751a2407712d8ea1854b9b31f68a31406.tar.gz
rails-60b525c751a2407712d8ea1854b9b31f68a31406.tar.bz2
rails-60b525c751a2407712d8ea1854b9b31f68a31406.zip
More descriptive error when rendering a partial with `:layout => true`
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/render_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/test/template/render_test.rb b/actionpack/test/template/render_test.rb
index 4e6a676fc6..9fb26e32b1 100644
--- a/actionpack/test/template/render_test.rb
+++ b/actionpack/test/template/render_test.rb
@@ -437,6 +437,11 @@ module RenderTestCases
@view.render(:partial => 'test/partial_with_layout_block_content', :layout => 'test/layout_for_partial', :locals => { :name => 'Foo!'})
end
+ def test_render_partial_with_layout_raises_descriptive_error
+ e = assert_raises(ActionView::MissingTemplate) { @view.render(partial: 'test/partial', layout: true) }
+ assert_match "Missing partial /true with", e.message
+ end
+
def test_render_with_nested_layout
assert_equal %(<title>title</title>\n\n<div id="column">column</div>\n<div id="content">content</div>\n),
@view.render(:file => "test/nested_layout", :layout => "layouts/yield")