class RSpecSearchAndDestroy::OrderFormatter

Public Instance Methods

stop() click to toggle source
Calls superclass method
# File lib/rspec-search-and-destroy/order_formatter.rb, line 5
def stop
  if enabled?
    File.open(filename, 'wb') do |f|
      Marshal.dump(results, f)
    end
  end

  super
end

Private Instance Methods

enabled?() click to toggle source
# File lib/rspec-search-and-destroy/order_formatter.rb, line 17
def enabled?
  filename
end
filename() click to toggle source
# File lib/rspec-search-and-destroy/order_formatter.rb, line 21
def filename
  ENV['RSPEC_SAD_RESULTS']
end
results() click to toggle source
# File lib/rspec-search-and-destroy/order_formatter.rb, line 25
def results
  examples.map do |e|
    {
      location: e.location,
      failed: !!e.exception
    }
  end
end