summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
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