test/unit/assertions/assert_raises_tests.rb in assert-2.18.4 vs test/unit/assertions/assert_raises_tests.rb in assert-2.19.0
- old
+ new
@@ -25,14 +25,15 @@
assert_that(test_run_result_count).equals(5)
assert_that(test_run_result_count(:pass)).equals(1)
assert_that(test_run_result_count(:fail)).equals(4)
exp =
- [ "#{desc1}\nStandardError or RuntimeError exception expected, not:",
+ [
+ "#{desc1}\nStandardError or RuntimeError exception expected, not:",
"#{desc1}\nRuntimeError exception expected, not:",
"#{desc1}\nRuntimeError exception expected but nothing raised.",
- "#{desc1}\nAn exception expected but nothing raised."
+ "#{desc1}\nAn exception expected but nothing raised.",
]
messages = test_run_results(:fail).map(&:message)
messages.each_with_index{ |msg, n| assert_that(msg).matches(/^#{exp[n]}/) }
end
@@ -79,11 +80,12 @@
assert_that(test_run_result_count).equals(4)
assert_that(test_run_result_count(:pass)).equals(2)
assert_that(test_run_result_count(:fail)).equals(2)
exp =
- [ "#{desc1}\nStandardError or RuntimeError exception not expected, but raised:",
- "#{desc1}\nAn exception not expected, but raised:"
+ [
+ "#{desc1}\nStandardError or RuntimeError exception not expected, but raised:",
+ "#{desc1}\nAn exception not expected, but raised:",
]
messages = test_run_results(:fail).map(&:message)
messages.each_with_index{ |msg, n| assert_that(msg).matches(/^#{exp[n]}/) }
end
end