# File lib/minitest/unit.rb, line 785
def self.autorun
at_exit {
# don't run if there was a non-exit exception
next if $! and not $!.kind_of? SystemExit
# the order here is important. The at_exit handler must be
# installed before anyone else gets a chance to install their
# own, that way we can be assured that our exit will be last
# to run (at_exit stacks).
exit_code = nil
at_exit {
@@after_tests.reverse_each(&:call)
exit false if exit_code && exit_code != 0
}
exit_code = MiniTest::Unit.new.run ARGV
} unless @@installed_at_exit
@@installed_at_exit = true
end