Sha256: 32b668f4962b5333e406ec83150bd57c7308ac307ccde6a724e98c969cf450fe
Contents?: true
Size: 628 Bytes
Versions: 15
Compression:
Stored size: 628 Bytes
Contents
module Teaspoon RESULT_ATTRS = [ :type, :suite, :label, :status, :skipped, :link, :message, :trace, :elapsed, :total, :start, :level, :coverage, :original_json, ] class Result < Struct.new(*RESULT_ATTRS) def self.build_from_json(json) new(*RESULT_ATTRS.map { |attr| json[attr.to_s] }) end def description "#{suite} #{label}" end def failing? (status != "passed" && status != "pending") && type == "spec" end def passing? status == "passed" end def pending? status == "pending" end end end
Version data entries
15 entries across 15 versions & 1 rubygems