aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-01 22:15:15 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-01 22:15:15 +0000
commit64740adcffbb18b298086ebff4d41c512fbc9435 (patch)
tree19543e6b3268678b826bede6e1c2162d84a251c4 /lib
parent0e24a11b597840f4690ac9738fbc3a2f7fa61b8a (diff)
downloadruby-64740adcffbb18b298086ebff4d41c512fbc9435.tar.gz
* lib/test/unit.rb (Test::Unit::Mini#_run_suites): show the result
even when interrupted on the way. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/test/unit.rb20
1 files changed, 18 insertions, 2 deletions
diff --git a/lib/test/unit.rb b/lib/test/unit.rb
index e2cff085ef..77f01fac15 100644
--- a/lib/test/unit.rb
+++ b/lib/test/unit.rb
@@ -163,8 +163,24 @@ module Test
@@installed_at_exit = true
end
- def run(*args)
- super
+ def _run_suites suites, type
+ @interrupt = nil
+ result = []
+ suites.each {|suite|
+ begin
+ result << _run_suite(suite, type)
+ rescue Interrupt => e
+ @interrupt = e
+ break
+ end
+ }
+ result
+ end
+
+ def status(*args)
+ result = super
+ raise @interrupt if @interrupt
+ result
end
end
end