Class: Minitest::AbstractReporter

Inherits:
Object
  • Object
show all
Defined in:
lib/minitest.rb

Overview

Defines the API for Reporters. Subclass this and override whatever you want. Go nuts.

Direct Known Subclasses

CompositeReporter, Reporter

Instance Method Summary collapse

Constructor Details

#initializeAbstractReporter

:nodoc:



705
706
707
# File 'lib/minitest.rb', line 705

def initialize # :nodoc:
  @mutex = Mutex.new
end

Instance Method Details

#passed?Boolean

Did this run pass?

Returns:

  • (Boolean)


740
741
742
# File 'lib/minitest.rb', line 740

def passed?
  true
end

#prerecord(klass, name) ⇒ Object

About to start running a test. This allows a reporter to show that it is starting or that we are in the middle of a test run.



719
720
# File 'lib/minitest.rb', line 719

def prerecord klass, name
end

#record(result) ⇒ Object

Output and record the result of the test. Call result#result_code to get the result character string. Stores the result of the run if the run did not pass.



728
729
# File 'lib/minitest.rb', line 728

def record result
end

#reportObject

Outputs the summary of the run.



734
735
# File 'lib/minitest.rb', line 734

def report
end

#startObject

Starts reporting on the run.



712
713
# File 'lib/minitest.rb', line 712

def start
end

#synchronize(&block) ⇒ Object

:nodoc:



744
745
746
# File 'lib/minitest.rb', line 744

def synchronize &block # :nodoc:
  @mutex.synchronize(&block)
end