summaryrefslogtreecommitdiff
path: root/test/lib/test/unit.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-27 04:16:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-27 04:16:44 +0000
commitde1219686595c2a3cde16c7dc6ac8643a1d8b340 (patch)
tree2cd42e72ab19e3006db525807c83539c1a9c8997 /test/lib/test/unit.rb
parent9c55cb2e9ebbe5366f3f1e7e3c63d64f860fc0a7 (diff)
test/unit: fix for the test
* test/lib/test/unit.rb (_run_parallel): make sure retrying message is a separate line. * test/lib/test/unit.rb (_prepare_run): do not add Output if testing. * test/lib/test/unit.rb (Skipping#failed): defer showing reports when showing skips, to be sorted. * test/testunit/test_hideskip.rb (test_hideskip): fix assertion for output misordered by mixing output destinations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/lib/test/unit.rb')
-rw-r--r--test/lib/test/unit.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/lib/test/unit.rb b/test/lib/test/unit.rb
index 312cacb8d0..419081a58f 100644
--- a/test/lib/test/unit.rb
+++ b/test/lib/test/unit.rb
@@ -426,7 +426,7 @@ module Test
suites.map! {|r| eval("::"+r[:testcase])}
del_status_line or puts
unless suites.empty?
- puts "Retrying..."
+ puts "\n""Retrying..."
_run_suites(suites, type)
end
end
@@ -478,6 +478,10 @@ module Test
end
module Skipping # :nodoc: all
+ def failed(s)
+ super if !s or @options[:hide_skip]
+ end
+
private
def setup_options(opts, options)
super
@@ -501,6 +505,7 @@ module Test
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) }
+ failed(nil)
result
end
end
@@ -585,7 +590,7 @@ module Test
if color or @options[:job_status] == :replace
@verbose = !options[:parallel]
end
- @output = Output.new(self)
+ @output = Output.new(self) unless @options[:testing]
if /\A\/(.*)\/\z/ =~ (filter = options[:filter])
filter = Regexp.new($1)
end