Project

General

Profile

Actions

Bug #4658

closed

Minitest - invalid return code when using MiniTest::Unit.after_tests

Added by rupert (Robert Pankowecki) almost 13 years ago. Updated almost 13 years ago.

Status:
Rejected
Target version:
-
ruby -v:
ruby 1.9.2p136 (2010-12-25 revision 30365) [i686-linux]
Backport:
[ruby-core:36053]

Description

If test fails and MiniTest::Unit.after_tests is used then the program returned code is 0 but it should not be.

Here is my current workaround:

MiniTest::Unit.after_tests do
status = ($! && $!.respond_to?(:status) && $!.status) || 0

do something...

exit(status)
end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0