class Cucumber::Messages::TestStep
#
combined with a ‘StepDefinition`, or from a `Hook`.
A `TestStep` is derived from either a `PickleStep`
*
#
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