spec/lib/flapjack/gateways/oobetet_spec.rb in flapjack-0.7.27 vs spec/lib/flapjack/gateways/oobetet_spec.rb in flapjack-0.7.28

- old
+ new

@@ -12,11 +12,11 @@ 'watched_entity' => 'foo.bar.net', 'rooms' => ['flapjacktest@conference.example.com'] } } - let(:stanza) { mock('stanza') } + let(:stanza) { double('stanza') } it "raises an error if a required config setting is not set" do Socket.should_receive(:gethostname).and_return('thismachine') fo = Flapjack::Gateways::Oobetet.new(:config => config.delete('watched_check'), :logger => @logger) @@ -109,10 +109,10 @@ fo_times.should have_key(:last_ack) fo_times[:last_ack].should == t.to_i end it "runs a loop checking for recorded problems" do - timer = mock('timer') + timer = double('timer') timer.should_receive(:cancel) EM::Synchrony.should_receive(:add_periodic_timer).with(60).and_return(timer) fo = Flapjack::Gateways::Oobetet.new(:config => config, :logger => @logger) fo.should_receive(:register_handler).exactly(3).times