Class: Spec::Story::Runner::ScenarioCollector

Inherits:
Object
  • Object
show all
Defined in:
lib/gems/rspec-1.1.12/lib/spec/story/runner/scenario_collector.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(story) ⇒ ScenarioCollector

Returns a new instance of ScenarioCollector.



7
8
9
10
# File 'lib/gems/rspec-1.1.12/lib/spec/story/runner/scenario_collector.rb', line 7

def initialize(story)
  @story = story
  @scenarios = []
end

Instance Attribute Details

#scenariosObject

Returns the value of attribute scenarios.



5
6
7
# File 'lib/gems/rspec-1.1.12/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/gems/rspec-1.1.12/lib/spec/story/runner/scenario_collector.rb', line 12

def Scenario(name, &body)
  @scenarios << Scenario.new(@story, name, &body)
end