Sha256: 5a21f4adc63bf95b5f59287dc90f30f8e3a474c15f9d9ae5ece58eb01583bd44
Contents?: true
Size: 1.28 KB
Versions: 48
Compression:
Stored size: 1.28 KB
Contents
require 'spec_helper' class ClassMixedWithDSLOutcomes include Beaker::DSL::Outcomes end describe ClassMixedWithDSLOutcomes do let(:logger) { double } before { subject.stub( :logger ).and_return( logger ) } describe '#pass_test' do it "logs the notification passed to it and raises PassTest" do logger.should_receive( :notify ).with( /blah/ ) expect { subject.pass_test('blah') }. to raise_error Beaker::DSL::Outcomes::PassTest end end describe '#skip_test' do it "logs the notification passed to it and raises SkipTest" do logger.should_receive( :notify ).with( /blah/ ) expect { subject.skip_test('blah') }. to raise_error Beaker::DSL::Outcomes::SkipTest end end describe '#pending_test' do it "logs the notification passed to it and raises PendingTest" do logger.should_receive( :warn ).with( /blah/ ) expect { subject.pending_test('blah') }. to raise_error Beaker::DSL::Outcomes::PendingTest end end describe '#fail_test' do it "logs the notification passed to it and raises FailTest" do logger.should_receive( :warn ) logger.should_receive( :pretty_backtrace ) expect { subject.fail_test('blah') }. to raise_error Beaker::DSL::Outcomes::FailTest end end end
Version data entries
48 entries across 48 versions & 1 rubygems