class Korinthenkacker::TestCase

Attributes

build[R]
class_name[R]
duration[R]
failed_since[R]
name[R]
status[R]

Public Class Methods

new(json, build) click to toggle source
# File lib/korinthenkacker/test_case.rb, line 5
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

Public Instance Methods

==(other) click to toggle source
# File lib/korinthenkacker/test_case.rb, line 31
def ==(other)
  other.class == self.class && other.full_name == self.full_name
end
Also aliased as: eql?
eql?(other)
Alias for: ==
failure?() click to toggle source
# File lib/korinthenkacker/test_case.rb, line 23
def failure?
  !success?
end
full_name() click to toggle source
# File lib/korinthenkacker/test_case.rb, line 15
def full_name
  [class_name, name].join('. ')
end
hash() click to toggle source
# File lib/korinthenkacker/test_case.rb, line 36
def hash
  full_name.hash
end
sibling?(other) click to toggle source
# File lib/korinthenkacker/test_case.rb, line 27
def sibling?(other)
  other == self && other.failed_since != self.failed_since
end
success?() click to toggle source
# File lib/korinthenkacker/test_case.rb, line 19
def success?
  !(status == 'REGRESSION' || status == 'FAILED')
end

Private Instance Methods

status_with_json(json) click to toggle source
# File lib/korinthenkacker/test_case.rb, line 42
def status_with_json(json)
  json['status'] == 'REGRESSION' || json['status'] == 'FAILED'
end