From b1d263505770f6dafe6c77fa33cf595f192441ba Mon Sep 17 00:00:00 2001 From: Franky W Date: Fri, 7 Nov 2014 18:27:18 -0800 Subject: Error message testing fix The testing of error messages have been implemented wrongly a few times. This is an attempt to fix it. For example, some of these test should have failed with the new code. The reason they are not failling with the new string is the fact they were not being tested beforehand. --- actionview/test/template/template_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'actionview/test/template/template_test.rb') diff --git a/actionview/test/template/template_test.rb b/actionview/test/template/template_test.rb index c94508d678..aae6a9aa09 100644 --- a/actionview/test/template/template_test.rb +++ b/actionview/test/template/template_test.rb @@ -183,10 +183,11 @@ class TestERBTemplate < ActiveSupport::TestCase end def test_error_when_template_isnt_valid_utf8 - assert_raises(ActionView::Template::Error, /\xFC/) do + e = assert_raises ActionView::Template::Error do @template = new_template("hello \xFCmlat", :virtual_path => nil) render end + assert_match(/\xFC/, e.message) end def with_external_encoding(encoding) -- cgit v1.2.3