From 60b525c751a2407712d8ea1854b9b31f68a31406 Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Sun, 2 Dec 2012 16:26:11 +0100 Subject: More descriptive error when rendering a partial with `:layout => true` --- actionpack/test/template/render_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actionpack/test') 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\n\n
column
\n
content
\n), @view.render(:file => "test/nested_layout", :layout => "layouts/yield") -- cgit v1.2.3