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
22 23 24 |
# File 'lib/teaspoon/result.rb', line 22 def self.build_from_json(json) new(*RESULT_ATTRS.map{ |attr| json[attr.to_s] }) end |
Instance Method Details
#description ⇒ Object
26 27 28 |
# File 'lib/teaspoon/result.rb', line 26 def description "#{suite} #{label}" end |
#failing? ⇒ Boolean
30 31 32 |
# File 'lib/teaspoon/result.rb', line 30 def failing? (status != "passed" && status != "pending") && type == "spec" end |
#passing? ⇒ Boolean
34 35 36 |
# File 'lib/teaspoon/result.rb', line 34 def passing? status == "passed" end |
#pending? ⇒ Boolean
38 39 40 |
# File 'lib/teaspoon/result.rb', line 38 def pending? status == "pending" end |