Class: Spec::Runner::Reporter::Failure
- Defined in:
- lib/spec/runner/reporter.rb
Instance Method Summary collapse
- #backtrace ⇒ Object
- #header ⇒ Object
-
#initialize(context_name, spec_name, exception) ⇒ Failure
constructor
A new instance of Failure.
- #message ⇒ Object
Constructor Details
#initialize(context_name, spec_name, exception) ⇒ Failure
Returns a new instance of Failure.
75 76 77 78 79 |
# File 'lib/spec/runner/reporter.rb', line 75 def initialize(context_name, spec_name, exception) @context_name = context_name @spec_name = spec_name @exception = exception end |
Instance Method Details
#backtrace ⇒ Object
89 90 91 |
# File 'lib/spec/runner/reporter.rb', line 89 def backtrace @exception.backtrace.nil? ? "" : @exception.backtrace.join("\n") end |
#header ⇒ Object
81 82 83 |
# File 'lib/spec/runner/reporter.rb', line 81 def header "#{class_name} in '#{@context_name} #{@spec_name}'" end |
#message ⇒ Object
85 86 87 |
# File 'lib/spec/runner/reporter.rb', line 85 def @exception. end |