diff options
Diffstat (limited to 'actionview/test/template/test_case_test.rb')
-rw-r--r-- | actionview/test/template/test_case_test.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/actionview/test/template/test_case_test.rb b/actionview/test/template/test_case_test.rb index 5697ffa317..c6cc47fb4f 100644 --- a/actionview/test/template/test_case_test.rb +++ b/actionview/test/template/test_case_test.rb @@ -155,7 +155,7 @@ module ActionView test "view_assigns excludes internal ivars" do INTERNAL_IVARS.each do |ivar| assert defined?(ivar), "expected #{ivar} to be defined" - assert !view_assigns.keys.include?(ivar.to_s.sub('@', '').to_sym), "expected #{ivar} to be excluded from view_assigns" + assert !view_assigns.keys.include?(ivar.to_s.tr('@', '').to_sym), "expected #{ivar} to be excluded from view_assigns" end end end @@ -328,9 +328,10 @@ module ActionView test "supports specifying locals (failing)" do controller.controller_path = "test" render(:template => "test/calling_partial_with_layout") - assert_raise ActiveSupport::TestCase::Assertion, /Somebody else.*David/m do + e = assert_raise ActiveSupport::TestCase::Assertion do assert_template :partial => "_partial_for_use_in_layout", :locals => { :name => "Somebody Else" } end + assert_match(/Somebody Else.*David/m, e.message) end test 'supports different locals on the same partial' do |