lib/test/unit/testsuite.rb in test-unit-3.0.9 vs lib/test/unit/testsuite.rb in test-unit-3.1.0

- old
+ new

@@ -51,14 +51,17 @@ while test = @tests.shift @n_tests += test.size run_test(test, result, &progress_block) @passed = false unless test.passed? end - run_shutdown(result) ensure - @elapsed_time = Time.now - @start_time - yield(FINISHED, name) - yield(FINISHED_OBJECT, self) + begin + run_shutdown(result) + ensure + @elapsed_time = Time.now - @start_time + yield(FINISHED, name) + yield(FINISHED_OBJECT, self) + end end # Adds the test to the suite. def <<(test) @tests << test