Method: Cucumber::Runtime::SupportCode#invoke_dynamic_step
- Defined in:
- lib/cucumber/runtime/support_code.rb
#invoke_dynamic_step(step_name, multiline_argument, _location = nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This allows users to attempt to find, match and execute steps from code as the features are running, as opposed to regular steps which are compiled into test steps before execution.
These are commonly called nested steps.
72 73 74 75 76 77 |
# File 'lib/cucumber/runtime/support_code.rb', line 72 def invoke_dynamic_step(step_name, multiline_argument, _location = nil) matches = step_matches(step_name) raise UndefinedDynamicStep, step_name if matches.empty? matches.first.invoke(multiline_argument) end |