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
dchelimsky-rspec-1.1.10 spec/spec/story/runner/scenario_collector_spec.rb
dchelimsky-rspec-1.1.11.1 spec/spec/story/runner/scenario_collector_spec.rb
dchelimsky-rspec-1.1.11.2 spec/spec/story/runner/scenario_collector_spec.rb
dchelimsky-rspec-1.1.11.3 spec/spec/story/runner/scenario_collector_spec.rb
dchelimsky-rspec-1.1.11.4 spec/spec/story/runner/scenario_collector_spec.rb
dchelimsky-rspec-1.1.11.5 spec/spec/story/runner/scenario_collector_spec.rb
dchelimsky-rspec-1.1.11.6 spec/spec/story/runner/scenario_collector_spec.rb
dchelimsky-rspec-1.1.11.7 spec/spec/story/runner/scenario_collector_spec.rb
dchelimsky-rspec-1.1.11 spec/spec/story/runner/scenario_collector_spec.rb
dchelimsky-rspec-stories-1.0.0 spec/spec/story/runner/scenario_collector_spec.rb
jnstq-acts_as_sms-0.1.0 test/vendor/plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb
jnstq-acts_as_sms-0.1.1 test/vendor/plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb
jnstq-acts_as_sms-0.1.3 test/vendor/plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb
jnstq-acts_as_sms-0.1.4 test/vendor/plugins/rspec/spec/spec/story/runner/scenario_collector_spec.rb
samstokes-rspec-stories-1.0.1 spec/spec/story/runner/scenario_collector_spec.rb
samstokes-rspec-stories-1.0.2 spec/spec/story/runner/scenario_collector_spec.rb
merb-core-1.1.3 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/spec/spec/story/runner/scenario_collector_spec.rb
merb-core-1.1.2 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/spec/spec/story/runner/scenario_collector_spec.rb
merb-core-1.1.1 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/spec/spec/story/runner/scenario_collector_spec.rb
merb-core-1.1.0 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/spec/spec/story/runner/scenario_collector_spec.rb