6 def initialize(step_group, runner, options={})
7 @step_group = step_group
14 @stories.collect { |p| p.to_proc }
17 def create_story(title, narrative)
18 @stories << Story.new(title, narrative, @step_group, @options)
21 def create_scenario(title)
22 current_story.add_scenario Scenario.new(title)
25 def create_given(name)
26 current_scenario.add_step Step.new('Given', name)
29 def create_given_scenario(name)
30 current_scenario.add_step Step.new('GivenScenario', name)
34 current_scenario.add_step Step.new('When', name)
38 current_scenario.add_step Step.new('Then', name)
42 stories.each { |story| @runner.instance_eval(&story) }
51 current_story.current_scenario
55 def initialize(title, narrative, step_group, options)
57 @narrative = narrative
59 @step_group = step_group
65 narrative = @narrative
66 scenarios = @scenarios.collect { |scenario| scenario.to_proc }
67 options = @options.merge(:steps => @step_group)
69 Story title, narrative, options do
70 scenarios.each { |scenario| instance_eval(&scenario) }
75 def add_scenario(scenario)
76 @scenarios << scenario
92 steps = @steps.collect { |step| step.to_proc }
95 steps.each { |step| instance_eval(&step) }
106 def initialize(type, name)