Sha256: 27b585fa82f495b1bc28aa9e92288cc9ec51a33511fb140aa9cc973a46972c99

Contents?: true

Size: 845 Bytes

Versions: 72

Compression:

Stored size: 845 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

72 entries across 72 versions & 12 rubygems

Version Path
spree-0.8.1 vendor/plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb
typo-5.0.1 vendor/plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb
typo-5.0.2 vendor/plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb
typo-5.0.3.98.1 vendor/plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb
typo-5.0 vendor/plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb
typo-5.0.3.98 vendor/plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb
typo-5.1.1 vendor/plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb
typo-5.1.2 vendor/plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb
typo-5.1.3 vendor/plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb
typo-5.1 vendor/plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb
typo-5.1.98 vendor/plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb
typo-5.2 vendor/plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb