class MiniTest::Unit

def self.autorun

def self.autorun
  at_exit {
    next if $! # don't run if there was an exception
    exit_code = MiniTest::Unit.new.run(ARGV)
    exit false if exit_code && exit_code != 0
  } unless @@installed_at_exit
  @@installed_at_exit = true
end