Class: Minitest::Reporter

Inherits:
AbstractReporter show all
Defined in:
lib/minitest.rb,
lib/minitest/parallel_each.rb

Overview

:nodoc:

Direct Known Subclasses

ProgressReporter, StatisticsReporter

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractReporter

#passed?, #report, #start

Constructor Details

#initialize(io = $stdout, options = {}) ⇒ Reporter

:nodoc:



408
409
410
411
# File 'lib/minitest.rb', line 408

def initialize io = $stdout, options = {} # :nodoc:
  self.io      = io
  self.options = options
end

Instance Attribute Details

#ioObject

The IO used to report.



401
402
403
# File 'lib/minitest.rb', line 401

def io
  @io
end

#optionsObject

Command-line options for this run.



406
407
408
# File 'lib/minitest.rb', line 406

def options
  @options
end

Class Method Details

.synchronizeObject

:nodoc:



91
92
93
94
95
96
97
# File 'lib/minitest/parallel_each.rb', line 91

def self.synchronize # :nodoc:
  if @mutex then # see parallel_each.rb
    @mutex.synchronize { yield }
  else
    yield
  end
end

Instance Method Details

#record(result) ⇒ Object



101
102
103
104
105
# File 'lib/minitest/parallel_each.rb', line 101

def record result
  Reporter.synchronize do
    simple_record result
  end
end

#simple_recordObject



99
# File 'lib/minitest/parallel_each.rb', line 99

alias :simple_record :record