diff --git a/ChangeLog b/ChangeLog index f9832ce0ec..20238d13ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ -Tue May 8 03:53:40 2012 Nobuyoshi Nakada +Tue May 8 03:53:54 2012 Nobuyoshi Nakada + + * 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. diff --git a/lib/test/unit.rb b/lib/test/unit.rb index ac15a95b07..b009edb6c0 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: