diff options
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/lookup_context_test.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/actionpack/test/template/lookup_context_test.rb b/actionpack/test/template/lookup_context_test.rb index 4258f88071..f7a684779c 100644 --- a/actionpack/test/template/lookup_context_test.rb +++ b/actionpack/test/template/lookup_context_test.rb @@ -255,20 +255,19 @@ end class TestMissingTemplate < ActiveSupport::TestCase def setup @lookup_context = ActionView::LookupContext.new("/Path/to/views", {}) - @details = "{:handlers=>[:erb, :rjs, :builder], :formats=>[:html, :text, :js, :css, :ics, :csv, :xml, :rss, :atom, :yaml, :multipart_form, :url_encoded_form, :json], :locale=>[:en, :en]}" end test "if no template was found we get a helpful error message including the inheritance chain" do e = assert_raise ActionView::MissingTemplate do @lookup_context.find("foo", %w(parent child)) end - assert_equal "Missing template parent/foo, child/foo with #{@details}. Searched in:\n * \"/Path/to/views\"\n", e.message + assert_match %r{Missing template parent/foo, child/foo with .* Searched in:\n \* "/Path/to/views"\n}, e.message end - + test "if no partial was found we get a helpful error message including the inheritance chain" do e = assert_raise ActionView::MissingTemplate do @lookup_context.find("foo", %w(parent child), true) end - assert_equal "Missing partial parent/foo, child/foo with #{@details}. 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 end |