class Cucumber::Formatter::Json
def create_result_hash(result)
def create_result_hash(result) result_hash = { status: result.to_sym } result_hash[:error_message] = create_error_message(result) if result.failed? || result.pending? result.duration.tap { |duration| result_hash[:duration] = duration.nanoseconds } result_hash end