Class: Cucumber::Formatter::RerunDump

Inherits:
Object
  • Object
show all
Includes:
Io
Defined in:
lib/cucumber/formatter/rerun_dump.rb

Overview

Works like rerun but just outputs file location and line number Each new test is output to a new line

Instance Method Summary collapse

Constructor Details

#initialize(_runtime, path_or_io, options) ⇒ RerunDump

Returns a new instance of RerunDump.



10
11
12
13
14
# File 'lib/cucumber/formatter/rerun_dump.rb', line 10

def initialize(_runtime, path_or_io, options)
  @io = ensure_io(path_or_io)
  @results = []
  @options = options
end

Instance Method Details

#after_test_case(test_case, _result) ⇒ Object



16
17
18
# File 'lib/cucumber/formatter/rerun_dump.rb', line 16

def after_test_case(test_case, _result)
  @results << [test_case.location.file, test_case.location.line]
end

#doneObject



20
21
22
23
# File 'lib/cucumber/formatter/rerun_dump.rb', line 20

def done
  return if @results.empty?
  @io.print file_failures.join("\n")
end