Class: TurnipFormatter::Resource::Scenario::Pending

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

Instance Attribute Summary

Attributes inherited from Base

#example

Instance Method Summary collapse

Methods inherited from Base

#backgrounds, #feature, #feature_info, #id, #initialize, #run_time, #status, #steps, #tags

Constructor Details

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

Instance Method Details

#mark_statusObject

Mark status for each step

example:

When foo
 And bar <= pending line
Then baz

# @steps => [
#   <Step::Step 'foo'>  # .status => :passed
#   <Step::Step 'bar'>  # .status => :pending
#   <Step::Step 'baz'>  # .status => :unexecute
# ]


22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/turnip_formatter/resource/scenario/pending.rb', line 22

def mark_status
  @steps.each do |step|
    step.mark_as_executed

    if pending_line_number == step.line
      step.set_pending(
        example.execution_result.pending_message,
        example.location
      )
      break
    end
  end
end