adding all of botlist, initial add
[botlist.git] / openbotlist / WEB-INF / lib / ruby / rspec / spec / spec / story / runner / scenario_collector_spec.rb
blob042c41e8dfb7ec1b97dfdb3521427ba5f2f796ce
1 require File.dirname(__FILE__) + '/../story_helper'
3 module Spec
4   module Story
5     module Runner
6       describe ScenarioCollector do
7         it 'should construct scenarios with the supplied story' do
8           # given
9           story = stub_everything('story')
10           scenario_collector = ScenarioCollector.new(story)
11           
12           # when
13           scenario_collector.Scenario 'scenario1' do end
14           scenario_collector.Scenario 'scenario2' do end
15           scenarios = scenario_collector.scenarios
16           
17           # then
18           scenario_collector.should have(2).scenarios
19           scenarios.first.name.should == 'scenario1'
20           scenarios.first.story.should equal(story)
21           scenarios.last.name.should == 'scenario2'
22           scenarios.last.story.should equal(story)
23         end
24       end
25     end
26   end
27 end