Class: Problem
- Inherits:
-
Object
- Object
- Problem
- Defined in:
- lib/test_spec/rspec/problem.rb
Instance Attribute Summary collapse
-
#backtrace ⇒ Object
readonly
Returns the value of attribute backtrace.
-
#backtrace_message ⇒ Object
readonly
Returns the value of attribute backtrace_message.
-
#explanation ⇒ Object
readonly
Returns the value of attribute explanation.
-
#highlighted_source ⇒ Object
readonly
Returns the value of attribute highlighted_source.
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(example, file_path) ⇒ Problem
constructor
A new instance of Problem.
Constructor Details
#initialize(example, file_path) ⇒ Problem
Returns a new instance of Problem.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/test_spec/rspec/problem.rb', line 8 def initialize(example, file_path) @example = example @exception = @example.exception @file_path = file_path return if @exception.nil? @klass = @exception.class @message = @exception..encode("utf-8") @backtrace = @exception.backtrace @backtrace_message = format_backtrace @highlighted_source = process_source @explanation = end |
Instance Attribute Details
#backtrace ⇒ Object (readonly)
Returns the value of attribute backtrace.
5 6 7 |
# File 'lib/test_spec/rspec/problem.rb', line 5 def backtrace @backtrace end |
#backtrace_message ⇒ Object (readonly)
Returns the value of attribute backtrace_message.
5 6 7 |
# File 'lib/test_spec/rspec/problem.rb', line 5 def @backtrace_message end |
#explanation ⇒ Object (readonly)
Returns the value of attribute explanation.
5 6 7 |
# File 'lib/test_spec/rspec/problem.rb', line 5 def explanation @explanation end |
#highlighted_source ⇒ Object (readonly)
Returns the value of attribute highlighted_source.
5 6 7 |
# File 'lib/test_spec/rspec/problem.rb', line 5 def highlighted_source @highlighted_source end |
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
5 6 7 |
# File 'lib/test_spec/rspec/problem.rb', line 5 def klass @klass end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
5 6 7 |
# File 'lib/test_spec/rspec/problem.rb', line 5 def @message end |