mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
lib/test/unit.rb: refactoring puke
* lib/test/unit.rb (Test::Unit::Runner#puke): modify only result and drop useless reports, not override entirely. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a6003269b6
commit
ec76e156fe
2 changed files with 11 additions and 16 deletions
|
@ -1,4 +1,7 @@
|
|||
Tue May 8 03:53:40 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Tue May 8 03:53:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/test/unit.rb (Test::Unit::Runner#puke): modify only result and
|
||||
drop useless reports, not override entirely.
|
||||
|
||||
* bootstraptest/runner.rb (exec_test, show_progress): show rotators
|
||||
and pass/fail counts.
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue