class Minitest::SummaryReporter

def aggregated_results io # :nodoc:

:nodoc:
def aggregated_results io # :nodoc:
  filtered_results = results.dup
  filtered_results.reject!(&:skipped?) unless
    options[:verbose] or options[:show_skips]
  skip = options[:skip] || []
  filtered_results.each_with_index { |result, i|
    next if skip.include? result.result_code
    io.puts "\n%3d) %s" % [i+1, result]
  }
  io.puts
  io
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
  aggregated_results io
  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="
  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 << ", %d warnings" % [warnings] if options[:Werror]
  extra << "\n\nYou have skipped tests. Run with --verbose for details." if
    results.any?(&:skipped?) unless
    options[:verbose]        or
    options[:show_skips]     or
    ENV["MT_NO_SKIP_MSG"]
  "%d runs, %d assertions, %d failures, %d errors, %d skips%s" %
    [count, assertions, failures, errors, skips, extra.join]
end

def to_s # :nodoc:

:nodoc:
def to_s # :nodoc:
  aggregated_results(StringIO.new("".b)).string
end