Exception: Spinach::StepNotDefinedException

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

Overview

This class represents the exception raised when Spinach can't find a step for a FeatureSteps.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(step) ⇒ StepNotDefinedException

Returns a new instance of StepNotDefinedException



12
13
14
# File 'lib/spinach/exceptions.rb', line 12

def initialize(step)
  @step = step
end

Instance Attribute Details

#stepObject (readonly)

Returns the value of attribute step



6
7
8
# File 'lib/spinach/exceptions.rb', line 6

def step
  @step
end

Instance Method Details

#messageString

Returns A custom message when scenario steps aren't found.



20
21
22
# File 'lib/spinach/exceptions.rb', line 20

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