aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorlxxxvi <lxxxvi@users.noreply.github.com>2018-05-05 14:11:59 +0200
committerlxxxvi <lxxxvi@users.noreply.github.com>2018-05-05 14:11:59 +0200
commitf4f7659acf22f4f37938034bf78673c81c1511b6 (patch)
treee225d9d7501b0e1a57b57fd83800ba8174229bf4 /activesupport/test
parent42b9e7e50c084e119a679cf155b70b5efc4d36ff (diff)
downloadrails-f4f7659acf22f4f37938034bf78673c81c1511b6.tar.gz
rails-f4f7659acf22f4f37938034bf78673c81c1511b6.tar.bz2
rails-f4f7659acf22f4f37938034bf78673c81c1511b6.zip
Clearer error message in assert_changes
When `to:` is passed to `assert_changes`, it now prints the well-known `"Expected: x\n Actual: y"` message. Before, the message only contained the actual value.
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/test_case_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/test/test_case_test.rb b/activesupport/test/test_case_test.rb
index 8a1ecb6b33..19901fad99 100644
--- a/activesupport/test/test_case_test.rb
+++ b/activesupport/test/test_case_test.rb
@@ -261,7 +261,7 @@ class AssertionsTest < ActiveSupport::TestCase
end
end
- assert_equal "@object.num should 1.\n\"@object.num\" didn't change to 1", error.message
+ assert_equal "@object.num should 1.\n\"@object.num\" didn't change to as expected\nExpected: 1\n Actual: -1", error.message
end
def test_assert_no_changes_pass