spec/mongo/address/ipv4_spec.rb in mongo-2.7.2 vs spec/mongo/address/ipv4_spec.rb in mongo-2.8.0.rc0
- old
+ new
@@ -67,14 +67,16 @@
let(:socket) do
resolver.socket(5, :ssl => true)
end
it 'returns an ssl socket' do
+ allow_any_instance_of(Mongo::Socket::SSL).to receive(:connect!)
expect(socket).to be_a(Mongo::Socket::SSL)
end
it 'sets the family as ipv4' do
+ allow_any_instance_of(Mongo::Socket::SSL).to receive(:connect!)
expect(socket.family).to eq(Socket::PF_INET)
end
end
context 'when ssl options are not provided' do
@@ -82,13 +84,15 @@
let(:socket) do
resolver.socket(5)
end
it 'returns a tcp socket' do
+ allow_any_instance_of(Mongo::Socket::TCP).to receive(:connect!)
expect(socket).to be_a(Mongo::Socket::TCP)
end
it 'sets the family a ipv4' do
+ allow_any_instance_of(Mongo::Socket::TCP).to receive(:connect!)
expect(socket.family).to eq(Socket::PF_INET)
end
end
end
end