Class: Spinach::Scenario
- Inherits:
-
Object
- Object
- Spinach::Scenario
- Defined in:
- lib/spinach/scenario.rb
Instance Attribute Summary collapse
-
#feature ⇒ Object
Returns the value of attribute feature.
-
#lines ⇒ Object
Returns the value of attribute lines.
-
#name ⇒ Object
Returns the value of attribute name.
-
#steps ⇒ Object
Returns the value of attribute steps.
-
#tags ⇒ Object
Returns the value of attribute tags.
Instance Method Summary collapse
-
#initialize(feature) ⇒ Scenario
constructor
A new instance of Scenario.
-
#ordering_id ⇒ Object
Identifier used by orderers.
Constructor Details
#initialize(feature) ⇒ Scenario
Returns a new instance of Scenario.
6 7 8 9 10 11 |
# File 'lib/spinach/scenario.rb', line 6 def initialize(feature) @feature = feature @steps = [] @tags = [] @lines = [] end |
Instance Attribute Details
#feature ⇒ Object
Returns the value of attribute feature.
4 5 6 |
# File 'lib/spinach/scenario.rb', line 4 def feature @feature end |
#lines ⇒ Object
Returns the value of attribute lines.
3 4 5 |
# File 'lib/spinach/scenario.rb', line 3 def lines @lines end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/spinach/scenario.rb', line 4 def name @name end |
#steps ⇒ Object
Returns the value of attribute steps.
4 5 6 |
# File 'lib/spinach/scenario.rb', line 4 def steps @steps end |
#tags ⇒ Object
Returns the value of attribute tags.
4 5 6 |
# File 'lib/spinach/scenario.rb', line 4 def @tags end |
Instance Method Details
#ordering_id ⇒ Object
Identifier used by orderers.
Needs to involve the relative file path and line number so that the ordering a seed generates is stable across both runs and machines.
19 20 21 |
# File 'lib/spinach/scenario.rb', line 19 def ordering_id "#{feature.ordering_id}:#{lines.first}" end |