Class: CI::Reporter::SpinachFailure

Inherits:
Object
  • Object
show all
Defined in:
lib/ci/reporter/spinach.rb

Instance Method Summary collapse

Constructor Details

#initialize(type, step, failure, step_location) ⇒ SpinachFailure

Returns a new instance of SpinachFailure.



48
49
50
51
52
53
# File 'lib/ci/reporter/spinach.rb', line 48

def initialize(type, step, failure, step_location)
  @type = type
  @step = step
  @failure = failure
  @step_location = step_location
end

Instance Method Details

#error?Boolean

Returns:

  • (Boolean)


59
60
61
# File 'lib/ci/reporter/spinach.rb', line 59

def error?
  @type == :error
end

#failure?Boolean

Returns:

  • (Boolean)


55
56
57
# File 'lib/ci/reporter/spinach.rb', line 55

def failure?
  @type == :failed
end

#locationObject



71
72
73
# File 'lib/ci/reporter/spinach.rb', line 71

def location
  @failure.backtrace.join("\n")
end

#messageObject



67
68
69
# File 'lib/ci/reporter/spinach.rb', line 67

def message
  @failure.message
end

#nameObject



63
64
65
# File 'lib/ci/reporter/spinach.rb', line 63

def name
  @failure.class.name
end