Sha256: e408cc16efbc7902ccc309c87f92ddf5fb225ddb6f77c7248910547a17d361a4

Contents?: true

Size: 731 Bytes

Versions: 72

Compression:

Stored size: 731 Bytes

Contents

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

module Spec
  module Story
    describe GivenScenario do
      it 'should execute a scenario from the current story in its world' do
        # given
        class MyWorld
          attr :scenario_ran
        end
        instance = World.create(MyWorld)
        scenario = ScenarioBuilder.new.to_scenario do
          @scenario_ran = true
        end
        Runner::StoryRunner.should_receive(:scenario_from_current_story).with('scenario name').and_return(scenario)
        
        step = GivenScenario.new 'scenario name'
        
        # when
        step.perform(instance, nil)
        
        # then
        instance.scenario_ran.should be_true
      end
    end
  end
end

Version data entries

72 entries across 72 versions & 12 rubygems

Version Path
dchelimsky-rspec-1.1.10 spec/spec/story/given_scenario_spec.rb
dchelimsky-rspec-1.1.11.1 spec/spec/story/given_scenario_spec.rb
dchelimsky-rspec-1.1.11.2 spec/spec/story/given_scenario_spec.rb
dchelimsky-rspec-1.1.11.3 spec/spec/story/given_scenario_spec.rb
dchelimsky-rspec-1.1.11.4 spec/spec/story/given_scenario_spec.rb
dchelimsky-rspec-1.1.11.5 spec/spec/story/given_scenario_spec.rb
dchelimsky-rspec-1.1.11.6 spec/spec/story/given_scenario_spec.rb
dchelimsky-rspec-1.1.11.7 spec/spec/story/given_scenario_spec.rb
dchelimsky-rspec-1.1.11 spec/spec/story/given_scenario_spec.rb
dchelimsky-rspec-stories-1.0.0 spec/spec/story/given_scenario_spec.rb
jnstq-acts_as_sms-0.1.0 test/vendor/plugins/rspec/spec/spec/story/given_scenario_spec.rb
jnstq-acts_as_sms-0.1.1 test/vendor/plugins/rspec/spec/spec/story/given_scenario_spec.rb
jnstq-acts_as_sms-0.1.3 test/vendor/plugins/rspec/spec/spec/story/given_scenario_spec.rb
jnstq-acts_as_sms-0.1.4 test/vendor/plugins/rspec/spec/spec/story/given_scenario_spec.rb
samstokes-rspec-stories-1.0.1 spec/spec/story/given_scenario_spec.rb
samstokes-rspec-stories-1.0.2 spec/spec/story/given_scenario_spec.rb
merb-core-1.1.3 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/spec/spec/story/given_scenario_spec.rb
merb-core-1.1.2 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/spec/spec/story/given_scenario_spec.rb
merb-core-1.1.1 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/spec/spec/story/given_scenario_spec.rb
merb-core-1.1.0 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/spec/spec/story/given_scenario_spec.rb