Class: Spackle::Spec::SpackleFormatter

Inherits:
BaseFormatter
  • Object
show all
Defined in:
lib/spackle/spec/spackle_formatter.rb

Instance Attribute Summary

Attributes inherited from BaseFormatter

#errors, #options, #output

Instance Method Summary collapse

Methods inherited from BaseFormatter

#close, #initialize

Constructor Details

This class inherits a constructor from Spackle::Spec::BaseFormatter

Instance Method Details

#example_failed(example, counter, failure) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/spackle/spec/spackle_formatter.rb', line 5

def example_failed(example, counter, failure)
  error = Spackle::Error.new failure.exception.message 
  failure.exception.backtrace.each do |frame|
    file, line = frame.match(/^([^:]+):([0-9]+)/)[1,2]
    error.add_error file, line 
  end
  self.errors << error
end