class Cucumber::Messages::TestCase
#
A ‘TestCase` contains a sequence of `TestStep`s.
#
Represents the TestCase message in Cucumber’s message protocol.
#
def self.from_h(hash)
Cucumber::Messages::TestCase.from_h(some_hash) # => #
corresponding snake_cased attributes.
If the hash keys are camelCased, they are properly assigned to the
Returns a new TestCase from the given hash.
#
def self.from_h(hash) return nil if hash.nil? new( id: hash[:id], pickle_id: hash[:pickleId], test_steps: hash[:testSteps]&.map { |item| TestStep.from_h(item) }, test_run_started_id: hash[:testRunStartedId] ) end
def initialize(
def initialize( id: '', pickle_id: '', test_steps: [], test_run_started_id: nil ) @id = id @pickle_id = pickle_id @test_steps = test_steps @test_run_started_id = test_run_started_id super() end