diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/test/unit.rb | 9 |
2 files changed, 5 insertions, 8 deletions
@@ -1,3 +1,7 @@ +Mon Mar 21 11:21:32 2011 Shota Fukumori <sorah@tubusu.net> + + * lib/test/unit.rb: Refactoring. Unified if and elsif. + Sun Mar 20 23:09:34 2011 Tadayoshi Funaba <tadf@dotrb.org> * ext/date/date_strftime.c: checks duplicated modifiers. diff --git a/lib/test/unit.rb b/lib/test/unit.rb index a69c039cc3..099fcb0c14 100644 --- a/lib/test/unit.rb +++ b/lib/test/unit.rb @@ -487,20 +487,13 @@ module Test end end - if @interrupt || @opts[:no_retry] + if @interrupt || @opts[:no_retry] || @need_quit rep.each do |r| report.push(*r[:report]) end @errors += rep.map{|x| x[:result][0] }.inject(:+) @failures += rep.map{|x| x[:result][1] }.inject(:+) @skips += rep.map{|x| x[:result][2] }.inject(:+) - elsif @need_quit - rep.each do |r| - report.push(*r[:report]) - @errors += r[:result][0] - @failures += r[:result][1] - @skips += r[:result][2] - end else puts "" puts "Retrying..." |