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