diff options
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 f7e7246198..87c9d1b022 100644 --- a/lib/test/unit.rb +++ b/lib/test/unit.rb @@ -162,10 +162,18 @@ module Test @@installed_at_exit = true end + def run(*args) + result = super + abort if @interrupt + result + end + def run_test_suites(*args) old_sync = @@out.sync if @@out.respond_to?(:sync=) + @interrupt = false super rescue Interrupt + @interrupt = true [@test_count, @assertion_count] ensure @@out.sync = old_sync if @@out.respond_to?(:sync=) |