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]
  filtered_results.each_with_index { |result, i|
    io.puts "\n%3d) %s" % [i+1, result]
  }
  io.puts
  io
end

def binary_string; ''.b; end

def binary_string; ''.b; end

def binary_string; ''.force_encoding(Encoding::ASCII_8BIT); end

def binary_string; ''.force_encoding(Encoding::ASCII_8BIT); 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=" # 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

def to_s

def to_s
  aggregated_results(StringIO.new(binary_string)).string
end