class Cucumber::Messages::TestStep
#
* For ‘AMBIGUOUS` steps, there will be multiple entries in `stepDefinitionIds` and `stepMatchArgumentsLists`. The first entry in the stepMatchArgumentsLists holds the list of arguments for the first matching step definition, the second entry for the second, etc
* For `UNDEFINED` steps `stepDefinitionIds` and `stepMatchArgumentsLists` will be empty.
When derived from a PickleStep:
A `TestStep` is derived from either a `PickleStep` combined with a `StepDefinition`, or from a `Hook`.
#
Represents the TestStep message in Cucumber’s message protocol.
#
def self.from_h(hash)
Cucumber::Messages::TestStep.from_h(some_hash) # => #
corresponding snake_cased attributes.
If the hash keys are camelCased, they are properly assigned to the
Returns a new TestStep from the given hash.
#
def self.from_h(hash) return nil if hash.nil? new( hook_id: hash[:hookId], id: hash[:id], pickle_step_id: hash[:pickleStepId], step_definition_ids: hash[:stepDefinitionIds], step_match_arguments_lists: hash[:stepMatchArgumentsLists]&.map { |item| StepMatchArgumentsList.from_h(item) } ) end
def initialize(
def initialize( hook_id: nil, id: '', pickle_step_id: nil, step_definition_ids: nil, step_match_arguments_lists: nil ) @hook_id = hook_id @id = id @pickle_step_id = pickle_step_id @step_definition_ids = step_definition_ids @step_match_arguments_lists = step_match_arguments_lists super() end