diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-11-22 14:14:41 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-12-02 08:35:34 +0100 |
commit | 543ccf740d57eb7e0b027b74bf2fa2538d39ed5a (patch) | |
tree | ccc5488026da1889c6816557c8a7e3f5c71cf615 /actionview/test | |
parent | 2e296c8ee5ddcbd20d7cc80313553148092f77b2 (diff) | |
download | rails-543ccf740d57eb7e0b027b74bf2fa2538d39ed5a.tar.gz rails-543ccf740d57eb7e0b027b74bf2fa2538d39ed5a.tar.bz2 rails-543ccf740d57eb7e0b027b74bf2fa2538d39ed5a.zip |
`ActionView::MissingTemplate` for partials includes underscore.
Missing partial folder/_partial instead of folder/partial.
Closes #13002.
Diffstat (limited to 'actionview/test')
-rw-r--r-- | actionview/test/template/lookup_context_test.rb | 4 | ||||
-rw-r--r-- | actionview/test/template/render_test.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/actionview/test/template/lookup_context_test.rb b/actionview/test/template/lookup_context_test.rb index 203ad6d910..a6a3d6279e 100644 --- a/actionview/test/template/lookup_context_test.rb +++ b/actionview/test/template/lookup_context_test.rb @@ -249,7 +249,7 @@ class TestMissingTemplate < ActiveSupport::TestCase e = assert_raise ActionView::MissingTemplate do @lookup_context.find("foo", %w(parent child), true) end - assert_match %r{Missing partial parent/foo, child/foo with .* Searched in:\n \* "/Path/to/views"\n}, e.message + assert_match %r{Missing partial parent/_foo, child/_foo with .* Searched in:\n \* "/Path/to/views"\n}, e.message end test "if a single prefix is passed as a string and the lookup fails, MissingTemplate accepts it" do @@ -257,7 +257,7 @@ class TestMissingTemplate < ActiveSupport::TestCase details = {:handlers=>[], :formats=>[], :locale=>[]} @lookup_context.view_paths.find("foo", "parent", true, details) end - assert_match %r{Missing partial parent/foo with .* Searched in:\n \* "/Path/to/views"\n}, e.message + assert_match %r{Missing partial parent/_foo with .* Searched in:\n \* "/Path/to/views"\n}, e.message end end diff --git a/actionview/test/template/render_test.rb b/actionview/test/template/render_test.rb index 5a7d11f513..055a273cc3 100644 --- a/actionview/test/template/render_test.rb +++ b/actionview/test/template/render_test.rb @@ -63,7 +63,7 @@ module RenderTestCases def test_render_template_with_a_missing_partial_of_another_format @view.lookup_context.formats = [:html] - assert_raise ActionView::Template::Error, "Missing partial /missing with {:locale=>[:en], :formats=>[:json], :handlers=>[:erb, :builder]}" do + assert_raise ActionView::Template::Error, "Missing partial /_missing with {:locale=>[:en], :formats=>[:json], :handlers=>[:erb, :builder]}" do @view.render(:template => "with_format", :formats => [:json]) end end @@ -444,7 +444,7 @@ module RenderTestCases 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 + assert_match "Missing partial /_true with", e.message end def test_render_with_nested_layout |