Exception: Cucumber::CucumberExpressions::AmbiguousParameterTypeError

Inherits:
CucumberExpressionError show all
Defined in:
lib/cucumber/cucumber_expressions/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(parameter_type_regexp, expression_regexp, parameter_types, generated_expressions) ⇒ AmbiguousParameterTypeError

Returns a new instance of AmbiguousParameterTypeError.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/cucumber/cucumber_expressions/errors.rb', line 13

def initialize(parameter_type_regexp, expression_regexp, parameter_types, generated_expressions)
  super(<<-EOM)
Your Regular Expression /#{expression_regexp.source}/
matches multiple parameter types with regexp /#{parameter_type_regexp}/:
   #{parameter_type_names(parameter_types)}

I couldn't decide which one to use. You have two options:

1) Use a Cucumber Expression instead of a Regular Expression. Try one of these:
   #{expressions(generated_expressions)}

2) Make one of the parameter types preferential and continue to use a Regular Expression.

  EOM
end