fixed printing failed assertions

This commit is contained in:
Christopher Aue
2017-07-11 12:53:48 +02:00
parent fc666bfe20
commit 495a2e605d
+2 -2
View File
@@ -23,8 +23,8 @@ def assertion_string(err, str, iso=nil, e=nil, bt=nil)
msg += " => #{e.message}" if e
msg += " (mrbgems: #{GEMNAME})" if Object.const_defined?(:GEMNAME)
if $mrbtest_assert && $mrbtest_assert.size > 0
$mrbtest_assert.each do |idx, msg, diff|
msg += "\n - Assertion[#{idx}] Failed: #{msg}\n#{diff}"
$mrbtest_assert.each do |idx, assert_msg, diff|
msg += "\n - Assertion[#{idx}] Failed: #{assert_msg}\n#{diff}"
end
end
msg += "\nbacktrace:\n\t#{bt.join("\n\t")}" if bt