Exception: Lucid::Ambiguous

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

Overview

Raised when a step matches two or more test definitions.

Instance Method Summary collapse

Constructor Details

#initialize(step_name, step_definitions, used_guess) ⇒ Ambiguous

Returns a new instance of Ambiguous.



26
27
28
29
30
31
32
# File 'lib/lucid/errors.rb', line 26

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