diff options
author | sorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-09-06 12:20:17 +0000 |
---|---|---|
committer | sorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-09-06 12:20:17 +0000 |
commit | 7e04b19d22f5b284782f9f1265d888ecbe339dd0 (patch) | |
tree | ab0317f11548a415a2368f9854839cf68b4efc37 /lib | |
parent | e2b7469698fa75ac8849287d91724c266fb4d404 (diff) | |
download | ruby-7e04b19d22f5b284782f9f1265d888ecbe339dd0.tar.gz |
* lib/test/unit.rb (_run_suites): Now reports are written the
following order: Skip, Failure, Error. [Feature #5282]
* test_sorting.rb: test for above.
* test4test_sorting.rb: Ditto.
* lib/test/unit.rb (run): Put RUBY_DESCIPTION before quitting.
[Feature #5282]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/test/unit.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/test/unit.rb b/lib/test/unit.rb index 09708d14df..8d3a726b9b 100644 --- a/lib/test/unit.rb +++ b/lib/test/unit.rb @@ -570,6 +570,8 @@ module Test } end report.reject!{|r| r.start_with? "Skipped:" } if @options[:hide_skip] + report.sort_by!{|r| r.start_with?("Skipped:") ? 0 : \ + (r.start_with?("Failure:") ? 1 : 2) } result end @@ -599,6 +601,12 @@ module Test raise @interrupt if @interrupt result end + + def run(*args) + result = super + puts "\nruby -v: #{RUBY_DESCRIPTION}" + result + end end class AutoRunner |