diff options
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/render_test.rb | 5 | ||||
-rw-r--r-- | actionpack/test/template/template_test.rb | 4 |
2 files changed, 7 insertions, 2 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") diff --git a/actionpack/test/template/template_test.rb b/actionpack/test/template/template_test.rb index ed9d303158..8d32205fb8 100644 --- a/actionpack/test/template/template_test.rb +++ b/actionpack/test/template/template_test.rb @@ -82,8 +82,8 @@ class TestERBTemplate < ActiveSupport::TestCase end def test_text_template_does_not_html_escape - @template = new_template("<%= apostrophe %>", format: :text) - assert_equal "l'apostrophe", render + @template = new_template("<%= apostrophe %> <%== apostrophe %>", format: :text) + assert_equal "l'apostrophe l'apostrophe", render end def test_raw_template |