spec/mongo/cluster/topology/unknown_spec.rb in mongo-2.4.0.rc1 vs spec/mongo/cluster/topology/unknown_spec.rb in mongo-2.4.0

- old
+ new

@@ -1,11 +1,15 @@ require 'spec_helper' describe Mongo::Cluster::Topology::Unknown do + let(:monitoring) do + Mongo::Monitoring.new(monitoring: false) + end + let(:topology) do - described_class.new({}) + described_class.new({}, monitoring) end describe '.servers' do let(:servers) do @@ -40,9 +44,23 @@ describe '.unknown?' do it 'returns true' do expect(topology.unknown?).to be(true) + end + end + + describe '#has_readable_servers?' do + + it 'returns false' do + expect(topology).to_not have_readable_server(nil, nil) + end + end + + describe '#has_writable_servers?' do + + it 'returns false' do + expect(topology).to_not have_writable_server(nil) end end describe '#add_hosts?' do