Module: MouseMelon::DSL::ScenarioDefinitions
- Defined in:
- lib/mouse_melon/dsl.rb
Instance Method Summary collapse
- #Step(name, *args) ⇒ Object (also: #Given, #When, #Then, #And, #But, #‣, #•)
Instance Method Details
#Step(name, *args) ⇒ Object Also known as: Given, When, Then, And, But, ‣, •
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/mouse_melon/dsl.rb', line 32 def Step(name, *args) normalized_name = case name when Symbol name when String name.to_s.gsub(/ /, '_') else raise ArgumentError.new("Expects Symbol or String but #{name.inspect} was given") end raise StepNotFound.new(normalized_name) unless respond_to?(normalized_name) send(normalized_name, *args) end |