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

Version Path
parallel_tests-0.6.9 lib/parallel_specs/spec_failures_logger.rb
parallel_tests-0.6.8 lib/parallel_specs/spec_failures_logger.rb
parallel_tests-0.6.7 lib/parallel_specs/spec_failures_logger.rb
parallel_tests-0.6.6 lib/parallel_specs/spec_failures_logger.rb
parallel_tests-0.6.5 lib/parallel_specs/spec_failures_logger.rb
parallel_tests-0.6.4 lib/parallel_specs/spec_failures_logger.rb
parallel_tests-0.6.3 lib/parallel_specs/spec_failures_logger.rb
parallel_tests-0.6.2 lib/parallel_specs/spec_failures_logger.rb
phene-parallel_tests-0.6.2 lib/parallel_specs/spec_failures_logger.rb
parallel_tests-0.6.1 lib/parallel_specs/spec_failures_logger.rb
parallel_tests-0.6.0 lib/parallel_specs/spec_failures_logger.rb
parallel_tests-0.5.0 lib/parallel_specs/spec_failures_logger.rb
parallel_tests-0.4.21 lib/parallel_specs/spec_failures_logger.rb