Sha256: edda892866b546cbae3447c3aff4eb411b51a63d6391052630d5f8ab5174e56c
Contents?: true
Size: 901 Bytes
Versions: 40
Compression:
Stored size: 901 Bytes
Contents
require 'lite_spec_helper' describe Mongo::Monitoring::Event::TopologyClosed do let(:address) do Mongo::Address.new('127.0.0.1:27017') end let(:monitoring) { double('monitoring') } let(:cluster) do double('cluster').tap do |cluster| allow(cluster).to receive(:addresses).and_return([address]) allow(cluster).to receive(:servers_list).and_return([]) end end let(:topology) do Mongo::Cluster::Topology::Unknown.new({}, monitoring, cluster) end let(:event) do described_class.new(topology) end describe '#summary' do skip_if_linting it 'renders correctly' do expect(topology).to receive(:server_descriptions).and_return({ '127.0.0.1:27017' => Mongo::Server::Description.new(Mongo::Address.new('127.0.0.1:27017'))}) expect(event.summary).to eq('#<TopologyClosed topology=Unknown[127.0.0.1:27017]>') end end end
Version data entries
40 entries across 40 versions & 2 rubygems