class Minitest::Test

def capture_exceptions # :nodoc:

:nodoc:
def capture_exceptions # :nodoc:
  begin
    yield
  rescue *PASSTHROUGH_EXCEPTIONS
    raise
  rescue Assertion => e
    self.failures << e
  rescue Exception => e
    self.failures << UnexpectedError.new(e)
  end
end