Sha256: 3c215e1b3d16fcdcc3a3417184f8a948d7398ec865aca604521574ddc99d85b3
Contents?: true
Size: 814 Bytes
Versions: 8
Compression:
Stored size: 814 Bytes
Contents
require 'cucumber/formatter/io' module Cucumber module Formatter class Rerun include Formatter::Io def initialize(runtime, path_or_io, options) @io = ensure_io(path_or_io, "rerun") @failures = {} end def after_test_case(test_case, result) return if result.passed? @failures[test_case.location.file] ||= [] @failures[test_case.location.file] << test_case.location.line end def done return if @failures.empty? @io.print file_failures.join(' ') end [:before_test_case, :before_test_step, :after_test_step].each do |method| define_method(method) { |*| } end private def file_failures @failures.map { |file, lines| [file, lines].join(':') } end end end end
Version data entries
8 entries across 8 versions & 1 rubygems