class Cucumber::Formatter::Rerun
Public Class Methods
new(config)
click to toggle source
# File lib/cucumber/formatter/rerun.rb, line 10 def initialize(config) @io = ensure_io(config.out_stream) @config = config @failures = {} config.on_event :test_case_finished do |event| test_case, result = *event.attributes next if result.ok?(@config.strict) @failures[test_case.location.file] ||= [] @failures[test_case.location.file] << test_case.location.line end config.on_event :test_run_finished do next if @failures.empty? @io.print file_failures.join("\n") end end
Private Instance Methods
file_failures()
click to toggle source
# File lib/cucumber/formatter/rerun.rb, line 28 def file_failures @failures.map { |file, lines| [file, lines].join(':') } end