class Cucumber::Messages::TestStepResult

Attributes

duration[R]
message[R]
status[R]

Public Class Methods

from_h(hash) click to toggle source

Returns a new TestStepResult from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.

Cucumber::Messages::TestStepResult.from_h(some_hash) # => #<Cucumber::Messages::TestStepResult:0x... ...>
# File lib/cucumber/messages.deserializers.rb, line 1108
def self.from_h(hash)
  return nil if hash.nil?

  self.new(
    duration: Duration.from_h(hash[:duration]),
    message: hash[:message],
    status: hash[:status],
  )
end
new( duration: Duration.new, message: nil, status: TestStepResultStatus::UNKNOWN ) click to toggle source
# File lib/cucumber/messages.dtos.rb, line 1793
def initialize(
  duration: Duration.new,
  message: nil,
  status: TestStepResultStatus::UNKNOWN
)
  @duration = duration
  @message = message
  @status = status
end