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("Your Regular Expression /\#{expression_regexp.source}/\nmatches multiple parameter types with regexp /\#{parameter_type_regexp}/:\n   \#{parameter_type_names(parameter_types)}\n\nI couldn't decide which one to use. You have two options:\n\n1) Use a Cucumber Expression instead of a Regular Expression. Try one of these:\n   \#{expressions(generated_expressions)}\n\n2) Make one of the parameter types preferential and continue to use a Regular Expression.\n\n  EOM\nend\n")