spec/lib/protobuf/rpc/connectors/zmq_spec.rb in protobuf-2.8.0 vs spec/lib/protobuf/rpc/connectors/zmq_spec.rb in protobuf-2.8.1
- old
+ new
@@ -10,23 +10,23 @@
:timeout => 3,
:host => "127.0.0.1",
:port => "9400"
}}
- let(:socket_mock) do
- sm = mock(::ZMQ::Socket)
+ let(:socket_double) do
+ sm = double(::ZMQ::Socket)
sm.stub(:connect).and_return(0)
sm
end
- let(:zmq_context_mock) do
- zc = mock(::ZMQ::Context)
- zc.stub(:socket).and_return(socket_mock)
+ let(:zmq_context_double) do
+ zc = double(::ZMQ::Context)
+ zc.stub(:socket).and_return(socket_double)
zc
end
before do
- ::ZMQ::Context.stub(:new).and_return(zmq_context_mock)
+ ::ZMQ::Context.stub(:new).and_return(zmq_context_double)
end
describe "#lookup_server_uri" do
let(:service_directory) { double('ServiceDirectory', :running? => running? ) }
let(:listing) { double('Listing', :address => '127.0.0.2', :port => 9399) }