From 7564d98929af0bb039cb10c59dff6d177c11bd13 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 6 Feb 2009 09:55:18 -0800 Subject: Include failed difference expression in assert message --- activesupport/test/test_test.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'activesupport/test/test_test.rb') diff --git a/activesupport/test/test_test.rb b/activesupport/test/test_test.rb index 298037e27c..d250b10822 100644 --- a/activesupport/test/test_test.rb +++ b/activesupport/test/test_test.rb @@ -66,7 +66,8 @@ class AssertDifferenceTest < ActiveSupport::TestCase end fail 'should not get to here' rescue Exception => e - assert_equal "<3> expected but was\n<2>.", e.message + assert_match(/didn't change by/, e.message) + assert_match(/expected but was/, e.message) end def test_array_of_expressions_identify_failure_when_message_provided @@ -75,7 +76,9 @@ class AssertDifferenceTest < ActiveSupport::TestCase end fail 'should not get to here' rescue Exception => e - assert_equal "something went wrong.\n<3> expected but was\n<2>.", e.message + assert_match(/something went wrong/, e.message) + assert_match(/didn't change by/, e.message) + assert_match(/expected but was/, e.message) end else def default_test; end -- cgit v1.2.3