Sha256: bd90d26ce28d2fdd0320b384ee30654abedf904647198a77e7bcdbf8c723234c

Contents?: true

Size: 459 Bytes

Versions: 17

Compression:

Stored size: 459 Bytes

Contents

require 'spec_helper'

describe Mongo::Socket::TCP do
  require_no_tls

  let(:address) { default_address }

  let!(:resolver) do
    address.send(:create_resolver, {})
  end

  let(:socket) do
    resolver.socket(5, {})
  end

  describe '#address' do
    it 'returns the address and tls indicator' do
      addr = socket.send(:socket).remote_address
      expect(socket.send(:address)).to eq("#{addr.ip_address}:#{addr.ip_port} (no TLS)")
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
mongo-2.10.5 spec/mongo/socket/tcp_spec.rb
mongo-2.10.4 spec/mongo/socket/tcp_spec.rb
mongo-2.11.3 spec/mongo/socket/tcp_spec.rb
mongo-2.11.2 spec/mongo/socket/tcp_spec.rb
mongo-2.11.1 spec/mongo/socket/tcp_spec.rb
mongo-2.10.3 spec/mongo/socket/tcp_spec.rb
mongo-2.11.0 spec/mongo/socket/tcp_spec.rb
mongo-2.9.2 spec/mongo/socket/tcp_spec.rb
mongo-2.10.2 spec/mongo/socket/tcp_spec.rb
mongo-2.11.0.rc0 spec/mongo/socket/tcp_spec.rb
mongo-2.10.1 spec/mongo/socket/tcp_spec.rb
mongo-2.10.0 spec/mongo/socket/tcp_spec.rb
mongo-2.9.1 spec/mongo/socket/tcp_spec.rb
mongo-2.10.0.rc0 spec/mongo/socket/tcp_spec.rb
mongo-2.9.1.rc0 spec/mongo/socket/tcp_spec.rb
mongo-2.9.0 spec/mongo/socket/tcp_spec.rb
mongo-2.9.0.rc1 spec/mongo/socket/tcp_spec.rb