Exception: Cucumber::Ambiguous

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

Overview

Raised when a step matches 2 or more StepDefinition

Instance Method Summary collapse

Constructor Details

#initialize(step_name, step_definitions) ⇒ Ambiguous

Returns a new instance of Ambiguous.



21
22
23
24
25
26
# File 'lib/cucumber/step_mother.rb', line 21

def initialize(step_name, step_definitions)
  message = "Ambiguous match of \"#{step_name}\":\n\n"
  message << step_definitions.map{|sd| sd.to_backtrace_line}.join("\n")
  message << "\n\n"
  super(message)
end