Sha256: 129925aaa20cec26cab1bb2d984ec41a54785b4880d7417814ea97665320e4be

Contents?: true

Size: 1.17 KB

Versions: 107

Compression:

Stored size: 1.17 KB

Contents

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

module Cucumber
  module StepMother
    describe 'Pending' do

      before(:each) do
        @step_mom = Object.new
        @step_mom.extend(StepMother)
        @world = @step_mom.__send__(:new_world!)
      end

      it 'should raise a Pending if no block is supplied' do
        lambda {
          @world.pending "TODO"
        }.should raise_error(Pending, /TODO/)
      end

      it 'should raise a Pending if a supplied block fails as expected' do
        lambda {
          @world.pending "TODO" do
            raise "oops"
          end
        }.should raise_error(Pending, /TODO/)
      end

      it 'should raise a Pending if a supplied block fails as expected with a mock' do
        lambda {
          @world.pending "TODO" do
            m = mock('thing')
            m.should_receive(:foo)
            m.rspec_verify
          end
        }.should raise_error(Pending, /TODO/)
      end

      it 'should raise a Pending if a supplied block starts working' do
        lambda {
          @world.pending "TODO" do
            # success!
          end
        }.should raise_error(Pending, /TODO/)
      end

    end
  end
end

Version data entries

107 entries across 107 versions & 9 rubygems

Version Path
aslakhellesoy-cucumber-0.1.100.1 spec/cucumber/world/pending_spec.rb
aslakhellesoy-cucumber-0.1.100.2 spec/cucumber/world/pending_spec.rb
aslakhellesoy-cucumber-0.1.100.3 spec/cucumber/world/pending_spec.rb
aslakhellesoy-cucumber-0.1.100.4 spec/cucumber/world/pending_spec.rb
aslakhellesoy-cucumber-0.1.100.5 spec/cucumber/world/pending_spec.rb
aslakhellesoy-cucumber-0.2.0.1 spec/cucumber/world/pending_spec.rb
aslakhellesoy-cucumber-0.2.0.2 spec/cucumber/world/pending_spec.rb
aslakhellesoy-cucumber-0.2.0.3 spec/cucumber/world/pending_spec.rb
aslakhellesoy-cucumber-0.2.0.4 spec/cucumber/world/pending_spec.rb
aslakhellesoy-cucumber-0.2.0 spec/cucumber/world/pending_spec.rb
aslakhellesoy-cucumber-0.2.1 spec/cucumber/world/pending_spec.rb
aslakhellesoy-cucumber-0.2.2.1 spec/cucumber/world/pending_spec.rb
aslakhellesoy-cucumber-0.2.2.2 spec/cucumber/world/pending_spec.rb
aslakhellesoy-cucumber-0.2.2 spec/cucumber/world/pending_spec.rb
aslakhellesoy-cucumber-0.2.3.1 specs/cucumber/world/pending_spec.rb
aslakhellesoy-cucumber-0.2.3.2 spec/cucumber/world/pending_spec.rb
aslakhellesoy-cucumber-0.2.3.3 spec/cucumber/world/pending_spec.rb
aslakhellesoy-cucumber-0.2.3.4 spec/cucumber/world/pending_spec.rb
aslakhellesoy-cucumber-0.2.3 specs/cucumber/world/pending_spec.rb
aslakhellesoy-cucumber-0.3.0.1 spec/cucumber/world/pending_spec.rb