Sha256: 36b98e1daefa8e56128239a229ea954e1640f2fdbff758c7f889fde655b7f052
Contents?: true
Size: 822 Bytes
Versions: 2
Compression:
Stored size: 822 Bytes
Contents
# frozen_string_literal: true # encoding: utf-8 require 'spec_helper' describe Mongo::Address::Unix do let(:resolver) do described_class.new(*described_class.parse(address)) end describe 'self.parse' do it 'returns the host and no port' do expect(described_class.parse('/path/to/socket.sock')).to eq(['/path/to/socket.sock']) end end describe '#initialize' do let(:address) do '/path/to/socket.sock' end it 'sets the host' do expect(resolver.host).to eq('/path/to/socket.sock') end end describe '#socket' do let(:address) do "/tmp/mongodb-#{SpecConfig.instance.any_port}.sock" end let(:socket) do resolver.socket(5) end it 'returns a unix socket' do expect(socket).to be_a(Mongo::Socket::Unix) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mongo-2.15.1 | spec/mongo/address/unix_spec.rb |
mongo-2.15.0 | spec/mongo/address/unix_spec.rb |