changelog shortlog tags changeset manifest revisions annotate raw

vendor/plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb

changeset 15: 64acf98d15f4
author: moriq@moriq.com
date: Mon Mar 10 10:12:58 2008 +0900 (16 years ago)
permissions: -rw-r--r--
description: add plugins rspec
1require File.dirname(__FILE__) + '/../story_helper'
2
3module 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
27end