Sha256: 80deaa4c2c7093905bf41e6125763621c39430baf17fccc5ea183af26f89aa92

Contents?: true

Size: 445 Bytes

Versions: 2

Compression:

Stored size: 445 Bytes

Contents

require 'rspec/core/formatters/progress_formatter'

module RSpec
  class Instafail < RSpec::Core::Formatters::ProgressFormatter
    RSpec::Core::Formatters.register self, :example_failed

    def initialize(output)
      super
      @output = output
      @failed_examples = []
    end

    def example_failed(failure)
      @failed_examples << failure.example
      @output.puts failure.fully_formatted(@failed_examples.size)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rspec-instafail-0.2.6 lib/rspec/instafail/rspec_3.rb
rspec-instafail-0.2.5 lib/rspec/instafail/rspec_3.rb