Sha256: 162b7cab5517819c335f3099caee1f266ee6163178f5f79d94b95c0d33e90156
Contents?: true
Size: 1.23 KB
Versions: 21
Compression:
Stored size: 1.23 KB
Contents
require 'spec_helper' require 'cucumber/rb_support/rb_language' module Cucumber describe 'Pending' do before(:each) do l = RbSupport::RbLanguage.new(Runtime.new) l.begin_rb_scenario(double('scenario').as_null_object) @world = l.current_world end it 'should raise a Pending if no block is supplied' do lambda { @world.pending "TODO" }.should raise_error(Cucumber::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(Cucumber::Pending, /TODO/) end it 'should raise a Pending if a supplied block fails as expected with a double' do lambda { @world.pending "TODO" do m = double('thing') m.should_receive(:foo) RSpec::Mocks.verify end }.should raise_error(Cucumber::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(Cucumber::Pending, /TODO/) end end end
Version data entries
21 entries across 19 versions & 2 rubygems