Class: TurnipFormatter::Scenario::Failure

Inherits:
Object
  • Object
show all
Includes:
RSpec::Core::BacktraceFormatter, TurnipFormatter::Scenario
Defined in:
lib/turnip_formatter/scenario/failure.rb

Instance Method Summary collapse

Methods included from TurnipFormatter::Scenario

#feature_file_path, #feature_name, #initialize, #method_missing, #name, #tags

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class TurnipFormatter::Scenario

Instance Method Details

#stepsObject



16
17
18
19
20
21
22
23
# File 'lib/turnip_formatter/scenario/failure.rb', line 16

def steps
  steps = super
  steps[offending_line].tap do |step|
    step.extend TurnipFormatter::Step::Failure
    step.attention(exception, backtrace)
  end
  steps
end

#validationObject



25
26
27
28
29
# File 'lib/turnip_formatter/scenario/failure.rb', line 25

def validation
  raise NotFailedScenarioError if (status != 'failed')
  offending_line
  super
end