Revert r35576 "lib/test/unit.rb: refactoring puke"

* lib/test/unit.rb (Test::Unit::Runner#puke): always add skipped
  results to the report for parallel test.  [Bug #6595]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-06-15 10:11:32 +00:00
Родитель 19b4b7de3b
Коммит 0dc5b8ce8c
2 изменённых файлов: 20 добавлений и 7 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Fri Jun 15 19:11:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/test/unit.rb (Test::Unit::Runner#puke): always add skipped
results to the report for parallel test. [Bug #6595]
Fri Jun 15 09:01:35 2012 Yuki Yugui Sonoda <yugui@google.com>
* nacl/pepper_main.c: Removed an unnecessary and errorneous inclusion.

Просмотреть файл

@ -735,13 +735,21 @@ module Test
# TODO:
# this overriding is for minitest feature that skip messages are
# hidden when not verbose (-v), note this is temporally.
n = report.size
rep = super
if MiniTest::Skip === e and /no message given\z/ =~ e.message
report.slice!(n..-1)
rep = "."
end
rep
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]
end
def initialize # :nodoc: