Class: Teabag::Result
- Inherits:
-
Struct
- Object
- Struct
- Teabag::Result
- Defined in:
- lib/teabag/result.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.build_from_json(json) ⇒ Object
21 22 23 |
# File 'lib/teabag/result.rb', line 21 def self.build_from_json(json) new(*RESULT_ATTRS.map{ |attr| json[attr.to_s] }) end |
Instance Method Details
#description ⇒ Object
25 26 27 |
# File 'lib/teabag/result.rb', line 25 def description "#{suite} #{label}" end |
#failing? ⇒ Boolean
29 30 31 |
# File 'lib/teabag/result.rb', line 29 def failing? (status != "passed" && status != "pending") && type == "spec" end |
#passing? ⇒ Boolean
33 34 35 |
# File 'lib/teabag/result.rb', line 33 def passing? status == "passed" end |
#pending? ⇒ Boolean
37 38 39 |
# File 'lib/teabag/result.rb', line 37 def pending? status == "pending" end |