class Minitest::SummaryReporter

def aggregated_results # :nodoc:

:nodoc:
def aggregated_results # :nodoc:
  filtered_results = results.dup
  filtered_results.reject!(&:skipped?) unless options[:verbose]
  s = filtered_results.each_with_index.map { |result, i|
    "\n%3d) %s" % [i+1, result]
  }.join("\n") + "\n"
  s.force_encoding(io.external_encoding) if
    ENCS and io.external_encoding and s.encoding != io.external_encoding
  s
end

def report # :nodoc:

:nodoc:
def report # :nodoc:
  super
  io.sync = self.old_sync
  io.puts unless options[:verbose] # finish the dots
  io.puts
  io.puts statistics
  io.puts aggregated_results
  io.puts summary
end

def start # :nodoc:

:nodoc:
def start # :nodoc:
  super
  io.puts "Run options: #{options[:args]}"
  io.puts
  io.puts "# Running:"
  io.puts
  self.sync = io.respond_to? :"sync=" # stupid emacs
  self.old_sync, io.sync = io.sync, true if self.sync
end

def statistics # :nodoc:

:nodoc:
def statistics # :nodoc:
  "Finished in %.6fs, %.4f runs/s, %.4f assertions/s." %
    [total_time, count / total_time, assertions / total_time]
end

def summary # :nodoc:

:nodoc:
def summary # :nodoc:
  extra = ""
  extra = "\n\nYou have skipped tests. Run with --verbose for details." if
    results.any?(&:skipped?) unless options[:verbose] or ENV["MT_NO_SKIP_MSG"]
  "%d runs, %d assertions, %d failures, %d errors, %d skips%s" %
    [count, assertions, failures, errors, skips, extra]
end