Issue #4658 has been reported by Robert Pankowecki.

----------------------------------------
Bug #4658: Minitest - invalid return code when using MiniTest::Unit.after_tests
http://redmine.ruby-lang.org/issues/4658

Author: Robert Pankowecki
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 1.9.2p136 (2010-12-25 revision 30365) [i686-linux]


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


-- 
http://redmine.ruby-lang.org