Exception: Hypercuke::StepAdapterNotDefinedError

Inherits:
NameError
  • Object
show all
Includes:
Error
Defined in:
lib/hypercuke/exceptions.rb

Class Method Summary collapse

Methods included from Error

included

Class Method Details

.translate_message(message) ⇒ Object



32
33
34
35
36
37
38
39
40
# File 'lib/hypercuke/exceptions.rb', line 32

def self.translate_message(message)
  step_adapter_name = 
    if md = /(Hypercuke::StepAdapters::\S*)/.match(message)
      md.captures.first
    else
      message
    end
  "Step adapter not defined: '#{step_adapter_name}'"
end