Class: Spec::Story::Runner::ScenarioCollector
- Inherits:
-
Object
- Object
- Spec::Story::Runner::ScenarioCollector
- Defined in:
- lib/spec/story/runner/scenario_collector.rb
Instance Attribute Summary collapse
-
#scenarios ⇒ Object
Returns the value of attribute scenarios.
Instance Method Summary collapse
-
#initialize(story) ⇒ ScenarioCollector
constructor
A new instance of ScenarioCollector.
- #Scenario(name, &body) ⇒ Object
Constructor Details
#initialize(story) ⇒ ScenarioCollector
Returns a new instance of ScenarioCollector.
7 8 9 10 |
# File 'lib/spec/story/runner/scenario_collector.rb', line 7 def initialize(story) @story = story @scenarios = [] end |
Instance Attribute Details
#scenarios ⇒ Object
Returns the value of attribute scenarios.
5 6 7 |
# File 'lib/spec/story/runner/scenario_collector.rb', line 5 def scenarios @scenarios end |
Instance Method Details
#Scenario(name, &body) ⇒ Object
12 13 14 |
# File 'lib/spec/story/runner/scenario_collector.rb', line 12 def Scenario(name, &body) @scenarios << Scenario.new(@story, name, &body) end |