Sha256: 171f3d17311162f48492ba0cc2730706a593291e7eaf4dfaf940de8d39523814
Contents?: true
Size: 970 Bytes
Versions: 2
Compression:
Stored size: 970 Bytes
Contents
module Korinthenkacker class TestCase attr_reader :name, :class_name, :duration, :failed_since, :status, :build def initialize(json, build) @name = json['name'] @class_name = json['className'] @duration = json['duration'] @failed_since = json['duration'] @status = json['status'] @failed_since = json['failedSince'] @build = build end def full_name [class_name, name].join('. ') end def success? !(status == 'REGRESSION' || status == 'FAILED') end def failure? !success? end def sibling?(other) other == self && other.failed_since != self.failed_since end def ==(other) other.class == self.class && other.full_name == self.full_name end alias_method :eql?, :== def hash full_name.hash end private def status_with_json(json) json['status'] == 'REGRESSION' || json['status'] == 'FAILED' end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
korinthenkacker-0.0.3 | lib/korinthenkacker/test_case.rb |
korinthenkacker-0.0.2 | lib/korinthenkacker/test_case.rb |