Sha256: 5ce6688d73e5011c88e341348f6a6fd1b188b1692efca7f7e07a81f0d11dd47b
Contents?: true
Size: 828 Bytes
Versions: 4
Compression:
Stored size: 828 Bytes
Contents
# frozen_string_literal: true require 'cucumber/formatter/io' module Cucumber module Formatter class Rerun include Formatter::Io 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 def file_failures @failures.map { |file, lines| [file, lines].join(':') } end end end end
Version data entries
4 entries across 4 versions & 2 rubygems