Exception: Cucumber::CucumberExpressions::AlternationNotAllowedInOptional
- Inherits:
-
CucumberExpressionError
- Object
- StandardError
- CucumberExpressionError
- Cucumber::CucumberExpressions::AlternationNotAllowedInOptional
- Defined in:
- lib/cucumber/cucumber_expressions/errors.rb
Instance Method Summary collapse
-
#initialize(expression, current) ⇒ AlternationNotAllowedInOptional
constructor
A new instance of AlternationNotAllowedInOptional.
Methods inherited from CucumberExpressionError
#build_message, #point_at, #point_at_located
Constructor Details
#initialize(expression, current) ⇒ AlternationNotAllowedInOptional
Returns a new instance of AlternationNotAllowedInOptional.
154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/cucumber/cucumber_expressions/errors.rb', line 154 def initialize(expression, current) super( ( current.start, expression, point_at_located(current), 'An alternation can not be used inside an optional', "If you did not mean to use an alternation you can use '\\/' to escape the '/'. Otherwise rephrase your expression or consider using a regular expression instead." ) ) end |