Class: Minitest::ProgressReporter

Inherits:
Reporter show all
Defined in:
lib/minitest.rb

Overview

A very simple reporter that prints the “dots” during the run.

This is added to the top-level CompositeReporter at the start of the run. If you want to change the output of minitest via a plugin, pull this out of the composite and replace it with your own.

Instance Attribute Summary

Attributes inherited from Reporter

#io, #options

Instance Method Summary collapse

Methods inherited from Reporter

#initialize

Methods inherited from AbstractReporter

#initialize, #passed?, #report, #start, #synchronize

Constructor Details

This class inherits a constructor from Minitest::Reporter

Instance Method Details

#prerecord(klass, name) ⇒ Object

:nodoc:



760
761
762
763
764
765
# File 'lib/minitest.rb', line 760

def prerecord klass, name # :nodoc:
  return unless options[:verbose]

  io.print "%s#%s = " % [klass.name, name]
  io.flush
end

#record(result) ⇒ Object

:nodoc:



767
768
769
770
771
# File 'lib/minitest.rb', line 767

def record result # :nodoc:
  io.print "%.2f s = " % [result.time] if options[:verbose]
  io.print result.result_code
  io.puts if options[:verbose]
end