class TurnipFormatter::Resource::Scenario::Pending

Public Instance Methods

mark_status() click to toggle source

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
# ]
# 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

Private Instance Methods

pending_line_number() click to toggle source
# File lib/turnip_formatter/resource/scenario/pending.rb, line 38
def pending_line_number
  example.metadata[:line_number]
end