Sha256: cf4b141359dc233c2fcf101442690a4dfa95d3df6cf121c742531cabfd12c484

Contents?: true

Size: 825 Bytes

Versions: 3

Compression:

Stored size: 825 Bytes

Contents

require File.dirname(__FILE__) + '/../story_helper'

module Spec
  module Story
    module Runner
      describe ScenarioCollector do
        it 'should construct scenarios with the supplied story' do
          # given
          story = stub_everything('story')
          scenario_collector = ScenarioCollector.new(story)

          # when
          scenario_collector.Scenario 'scenario1' do end
          scenario_collector.Scenario 'scenario2' do end
          scenarios = scenario_collector.scenarios

          # then
          scenario_collector.should have(2).scenarios
          scenarios.first.name.should == 'scenario1'
          scenarios.first.story.should equal(story)
          scenarios.last.name.should == 'scenario2'
          scenarios.last.story.should equal(story)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
picolena-0.1.6 rails_plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb
picolena-0.1.7 rails_plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb
picolena-0.1.8 rails_plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb