Class: CapturefulFormatter::Structures::Feature
- Inherits:
-
Object
- Object
- CapturefulFormatter::Structures::Feature
- Defined in:
- lib/captureful_formatter/structures.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#scenarios ⇒ Object
Returns the value of attribute scenarios.
Instance Method Summary collapse
- #all_passed ⇒ Object
-
#initialize(notification) ⇒ Feature
constructor
- notification
-
GroupNotification.
- #num_failed ⇒ Object
- #num_passed ⇒ Object
- #num_pending ⇒ Object
Constructor Details
#initialize(notification) ⇒ Feature
- notification
-
GroupNotification
13 14 15 16 |
# File 'lib/captureful_formatter/structures.rb', line 13 def initialize(notification) @description = notification.group.description @scenarios = [] end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
9 10 11 |
# File 'lib/captureful_formatter/structures.rb', line 9 def description @description end |
#scenarios ⇒ Object
Returns the value of attribute scenarios.
8 9 10 |
# File 'lib/captureful_formatter/structures.rb', line 8 def scenarios @scenarios end |
Instance Method Details
#all_passed ⇒ Object
18 19 20 |
# File 'lib/captureful_formatter/structures.rb', line 18 def all_passed @scenarios.count == num_passed end |
#num_failed ⇒ Object
30 31 32 |
# File 'lib/captureful_formatter/structures.rb', line 30 def num_failed @scenarios.count {|scenario| scenario.status == :failed } end |
#num_passed ⇒ Object
22 23 24 |
# File 'lib/captureful_formatter/structures.rb', line 22 def num_passed @scenarios.count {|scenario| scenario.status == :passed } end |
#num_pending ⇒ Object
26 27 28 |
# File 'lib/captureful_formatter/structures.rb', line 26 def num_pending @scenarios.count {|scenario| scenario.status == :pending } end |