class Cucumber::Messages::TestStepResult
Represents the TestStepResult
message in Cucumber’s message protocol.
Attributes
duration[R]
exception[R]
Exception
thrown while executing this step, if any.
message[R]
An arbitrary bit of information that explains this result. This can be a stack trace of anything else.
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/test_step_result.rb, line 45 def self.from_h(hash) return nil if hash.nil? new( duration: Duration.from_h(hash[:duration]), message: hash[:message], status: hash[:status], exception: Exception.from_h(hash[:exception]) ) end
new( duration: Duration.new, message: nil, status: TestStepResultStatus::UNKNOWN, exception: nil )
click to toggle source
Calls superclass method
# File lib/cucumber/messages/test_step_result.rb, line 25 def initialize( duration: Duration.new, message: nil, status: TestStepResultStatus::UNKNOWN, exception: nil ) @duration = duration @message = message @status = status @exception = exception super() end