Exception: Cucumber::Ambiguous

Inherits:
StandardError
  • Object
show all
Defined in:
lib/cucumber/errors.rb

Overview

Raised when a step matches 2 or more StepDefinitions

Instance Method Summary collapse

Constructor Details

#initialize(step_name, step_definitions, used_guess) ⇒ Ambiguous



39
40
41
42
43
44
45
46
# File 'lib/cucumber/errors.rb', line 39

def initialize(step_name, step_definitions, used_guess)
  message = String.new
  message << "Ambiguous match of \"#{step_name}\":\n\n"
  message << step_definitions.map(&:backtrace_line).join("\n")
  message << "\n\n"
  message << "You can run again with --guess to make Cucumber be more smart about it\n" unless used_guess
  super(message)
end