aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2010-12-31 11:17:37 +0100
committerPiotr Sarnacki <drogus@gmail.com>2010-12-31 11:17:37 +0100
commit8e5d91062f25f8c97a3bd8c6dc7dc45e38b54388 (patch)
tree8b68df37cfc81204453a89371d89ebec75b0d1ba /actionpack/test
parent4c44f0468a0b6d2dd9b67d801da4336ad9a169a0 (diff)
downloadrails-8e5d91062f25f8c97a3bd8c6dc7dc45e38b54388.tar.gz
rails-8e5d91062f25f8c97a3bd8c6dc7dc45e38b54388.tar.bz2
rails-8e5d91062f25f8c97a3bd8c6dc7dc45e38b54388.zip
Don't be so picky on MissingTemplate error details, this fails randomly on 1.8.7 because of not ordered hash
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/lookup_context_test.rb7
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