Sha256: 38045146702a14008f61733f7c76f23dc8f40ab2822a1c3bc16b604030eef0d2
Contents?: true
Size: 675 Bytes
Versions: 13
Compression:
Stored size: 675 Bytes
Contents
require 'parallel_specs' require File.join(File.dirname(__FILE__), 'spec_logger_base') class ParallelSpecs::SpecFailuresLogger < ParallelSpecs::SpecLoggerBase def initialize(options, output=nil) super @failed_examples = [] end def example_failed(example, count, failure) @failed_examples << example end def dump_failure(*args) lock_output do @failed_examples.each.with_index do | example, i | spec_file = example.location.scan(/^[^:]+/)[0] spec_file.gsub!(%r(^.*?/spec/), './spec/') @output.puts "#{ParallelSpecs.executable} #{spec_file} -e \"#{example.description}\"" end end @output.flush end end
Version data entries
13 entries across 13 versions & 2 rubygems