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