summaryrefslogtreecommitdiff
path: root/lib/test/unit.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/test/unit.rb')
-rw-r--r--lib/test/unit.rb22
1 files changed, 7 insertions, 15 deletions
diff --git a/lib/test/unit.rb b/lib/test/unit.rb
index ac15a95b077..b009edb6c0a 100644
--- a/lib/test/unit.rb
+++ b/lib/test/unit.rb
@@ -650,21 +650,13 @@ module Test
# TODO:
# this overriding is for minitest feature that skip messages are
# hidden when not verbose (-v), note this is temporally.
- e = case e
- when MiniTest::Skip then
- @skips += 1
- return "." if /no message given\z/ =~ e.message
- "Skipped:\n#{meth}(#{klass}) [#{location e}]:\n#{e.message}\n"
- when MiniTest::Assertion then
- @failures += 1
- "Failure:\n#{meth}(#{klass}) [#{location e}]:\n#{e.message}\n"
- else
- @errors += 1
- bt = MiniTest::filter_backtrace(e.backtrace).join "\n "
- "Error:\n#{meth}(#{klass}):\n#{e.class}: #{e.message}\n #{bt}\n"
- end
- @report << e
- e[0, 1]
+ n = report.size
+ rep = super
+ if MiniTest::Skip === e and /no message given\z/ =~ e.message
+ report.slice!(n..-1)
+ rep = "."
+ end
+ rep
end
def initialize # :nodoc: