Class: ParallelSpecs::SpecErrorCountLogger

Inherits:
SpecLoggerBase show all
Defined in:
lib/parallel_specs/spec_error_count_logger.rb

Constant Summary

Constants inherited from SpecLoggerBase

ParallelSpecs::SpecLoggerBase::RSPEC_1

Instance Method Summary collapse

Methods inherited from SpecLoggerBase

#close, #dump_failure, #dump_failures, #dump_pending, #lock_output

Constructor Details

#initialize(options, output = nil) ⇒ SpecErrorCountLogger

Returns a new instance of SpecErrorCountLogger.



5
6
7
8
9
10
# File 'lib/parallel_specs/spec_error_count_logger.rb', line 5

def initialize(options, output=nil)
  super
  @passed_examples = []
  @pending_examples = []
  @failed_examples = []
end

Instance Method Details

#dump_summary(duration, example_count, failure_count, pending_count) ⇒ Object



24
25
26
27
28
29
# File 'lib/parallel_specs/spec_error_count_logger.rb', line 24

def dump_summary(duration, example_count, failure_count, pending_count)
  lock_output do
    @output.puts "#{ @failed_examples.size }"
  end
  @output.flush
end

#example_failed(example, count, failure) ⇒ Object



20
21
22
# File 'lib/parallel_specs/spec_error_count_logger.rb', line 20

def example_failed(example, count, failure)
  @failed_examples << failure
end

#example_passed(example) ⇒ Object



12
13
14
# File 'lib/parallel_specs/spec_error_count_logger.rb', line 12

def example_passed(example)
  @passed_examples << example
end

#example_pending(*args) ⇒ Object



16
17
18
# File 'lib/parallel_specs/spec_error_count_logger.rb', line 16

def example_pending(*args)
  @pending_examples << args
end