Exception: Spinach::StepPendingException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/spinach/exceptions.rb

Overview

This class represents the exception raised when Spinach find a step which claims to be pending for a FeatureSteps.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reason) ⇒ StepPendingException

Returns a new instance of StepPendingException.

Parameters:

  • reason (String)

    The reason why the step is set to pending



36
37
38
# File 'lib/spinach/exceptions.rb', line 36

def initialize(reason)
  @reason = reason
end

Instance Attribute Details

#reasonObject (readonly)

Returns the value of attribute reason.



29
30
31
# File 'lib/spinach/exceptions.rb', line 29

def reason
  @reason
end

#stepObject

Returns the value of attribute step.



30
31
32
# File 'lib/spinach/exceptions.rb', line 30

def step
  @step
end

Instance Method Details

#messageString

Returns A custom message when scenario steps are pending.

Returns:

  • (String)

    A custom message when scenario steps are pending.



44
45
46
# File 'lib/spinach/exceptions.rb', line 44

def message
  "Step '#{@step.name}' pending"
end