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

- (StepNotDefinedException) initialize(step)

Returns a new instance of StepNotDefinedException

Parameters:

  • step (Hash)

    The missing step.



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

def initialize(step)
  @step = step
end

Instance Attribute Details

- (Object) step (readonly)

Returns the value of attribute step



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

def step
  @step
end

Instance Method Details

- (String) message

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

Returns:

  • (String)

    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