Class: TurnipFormatter::Scenario::Failure

Inherits:
Base
  • Object
show all
Defined in:
lib/turnip_formatter/scenario/failure.rb

Instance Attribute Summary

Attributes inherited from Base

#errors, #example

Instance Method Summary collapse

Methods inherited from Base

#feature_info, #feature_name, #id, #initialize, #name, #run_time, #status, #tags, #valid?

Constructor Details

This class inherits a constructor from TurnipFormatter::Scenario::Base

Instance Method Details

#stepsObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/turnip_formatter/scenario/failure.rb', line 6

def steps
  steps = super
  return steps unless failed_line_number

  steps.each do |step|
    case
    when step.line == failed_line_number
      step.status = :failed
    when step.line > failed_line_number
      step.status = :unexecuted
    end
  end

  steps
end