CI::Reporter::RSpec2Failure

Public Class Methods

new(example, formatter) click to toggle source
# File lib/ci/reporter/rspec.rb, line 52
def initialize(example, formatter)
  @formatter = formatter
  @example = example
  @exception = @example.execution_result[:exception] || @example.execution_result[:exception_encountered]
end

Public Instance Methods

failure?() click to toggle source
# File lib/ci/reporter/rspec.rb, line 58
def failure?
  exception.is_a?(::RSpec::Expectations::ExpectationNotMetError)
end
location() click to toggle source
# File lib/ci/reporter/rspec.rb, line 62
def location() 
  output = []
  output.push "#{exception.class.name << ":"}" unless exception.class.name =~ /RSpec/
  output.push @exception.message

  @formatter.format_backtrace(@exception.backtrace, @example).each do |backtrace_info|
    output.push "     #{backtrace_info}"
  end
  output.join "\n"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.