Sha256: 088e78ddb979afe27f7c7419179a95b32a4e750700830caf3bc837b875a66091

Contents?: true

Size: 1.04 KB

Versions: 5

Compression:

Stored size: 1.04 KB

Contents

require 'parallelized_specs/spec_logger_base'

class ParallelizedSpecs::TrendingExampleFailures < ParallelizedSpecs::SpecLoggerBase

  def example_failed(example, counter, failure)
    if RSPEC_1
      if example.location != nil
        @failed_examples ||= {}
        @failed_examples["#{example.location.match(/spec.*\d/).to_s}*"] = ["#{example.description}*", "#{failure.header}*", "#{failure.exception.to_s.gsub(/\n/,"")}*", "#{failure.exception.backtrace.to_s.gsub(/\n/,"")}*", "#{Date.today}*"]
      end
    end
  end

  def dump_summary(*args);end

  def dump_failures(*args);end

  def dump_failure(*args);end

  def dump_pending(*args);end

  def dump_summary(*args)
    if File.exists?("#{Rails.root}/spec/build_info.txt")
      @hudson_build_info = File.read("#{Rails.root}/spec/build_info.txt")
    else
      @hudson_build_info = "no*hudson build*info"
    end
    lock_output do
      (@failed_examples||{}).each_pair do |example, details|
        @output.puts "#{example}#{details}#{@hudson_build_info}"
      end
      @output.flush
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
parallelized_specs-0.4.50 lib/parallelized_specs/trending_example_failures_logger.rb
parallelized_specs-0.4.49 lib/parallelized_specs/trending_example_failures_logger.rb
parallelized_specs-0.4.48 lib/parallelized_specs/trending_example_failures_logger.rb
parallelized_specs-0.4.47 lib/parallelized_specs/trending_example_failures_logger.rb
parallelized_specs-0.4.46 lib/parallelized_specs/trending_example_failures_logger.rb