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

- old
+ new

@@ -9,14 +9,14 @@ let(:entity_name) { 'example.com'} let(:entity_name_esc) { CGI.escape(entity_name) } let(:check) { 'ping' } - let(:entity) { mock(Flapjack::Data::Entity) } - let(:entity_check) { mock(Flapjack::Data::EntityCheck) } + let(:entity) { double(Flapjack::Data::Entity) } + let(:entity_check) { double(Flapjack::Data::EntityCheck) } - let(:redis) { mock('redis') } + let(:redis) { double('redis') } before(:all) do Flapjack::Gateways::Web.class_eval { set :raise_errors, true set :show_exceptions, false @@ -237,10 +237,10 @@ get "/contacts" last_response.should be_ok end it "shows details of an individual contact found by id" do - contact = mock('contact') + contact = double('contact') contact.should_receive(:name).twice.and_return("Smithson Smith") contact.should_receive(:media).exactly(3).times.and_return({}) contact.should_receive(:entities).with(:checks => true).and_return([]) contact.should_receive(:notification_rules).and_return([])