summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-05 04:45:10 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-05 04:45:10 +0000
commiteecfa1fc7a9156a42cf937f08719117bf398b3a0 (patch)
tree7c181e75f3b15ec326c961cc87b18c87438ee278 /test
parent281f090bf11fd2b65d65fe29b634efa211142658 (diff)
incompatible encoding workaround
* test/lib/minitest/unit.rb (puke): workaround incompatible encoding error messages. * test/lib/test/unit/assertions.rb (AllFailures.message): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/lib/minitest/unit.rb2
-rw-r--r--test/lib/test/unit/assertions.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/lib/minitest/unit.rb b/test/lib/minitest/unit.rb
index 62f89e97e59..aa53ef06f6e 100644
--- a/test/lib/minitest/unit.rb
+++ b/test/lib/minitest/unit.rb
@@ -998,7 +998,7 @@ module MiniTest
else
@errors += 1
bt = MiniTest::filter_backtrace(e.backtrace).join "\n "
- "Error:\n#{klass}##{meth}:\n#{e.class}: #{e.message}\n #{bt}\n"
+ "Error:\n#{klass}##{meth}:\n#{e.class}: #{e.message.b}\n #{bt}\n"
end
@report << e
e[0, 1]
diff --git a/test/lib/test/unit/assertions.rb b/test/lib/test/unit/assertions.rb
index cdd188478f0..41463ea61bb 100644
--- a/test/lib/test/unit/assertions.rb
+++ b/test/lib/test/unit/assertions.rb
@@ -801,7 +801,7 @@ eom
total = @count.to_s
fmt = "%#{total.size}d"
@failures.map {|k, (n, v)|
- "\n#{i+=1}. [#{fmt%n}/#{total}] Assertion for #{k.inspect}\n#{v.message.gsub(/^/, ' | ')}"
+ "\n#{i+=1}. [#{fmt%n}/#{total}] Assertion for #{k.inspect}\n#{v.message.b.gsub(/^/, ' | ')}"
}.join("\n")
end