Sha256: 372137226b9139bdf36493c4c3ed5e94b26a77282ac77465b3e7c8ac0c47a995

Contents?: true

Size: 715 Bytes

Versions: 43

Compression:

Stored size: 715 Bytes

Contents

require 'lite_spec_helper'

describe Mongo::Monitoring::Event::ServerHeartbeatStarted 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(address)
  end

  describe '#summary' do
    it 'renders correctly' do
      expect(event.summary).to eq('#<ServerHeartbeatStarted address=127.0.0.1:27017>')
    end
  end
end

Version data entries

43 entries across 43 versions & 2 rubygems

Version Path
mongo-2.13.3 spec/mongo/monitoring/event/server_heartbeat_started_spec.rb
mongo-2.14.1 spec/mongo/monitoring/event/server_heartbeat_started_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/mongo-2.8.0/spec/mongo/monitoring/event/server_heartbeat_started_spec.rb
mongo-2.15.0.alpha spec/mongo/monitoring/event/server_heartbeat_started_spec.rb
mongo-2.13.2 spec/mongo/monitoring/event/server_heartbeat_started_spec.rb
mongo-2.14.0 spec/mongo/monitoring/event/server_heartbeat_started_spec.rb
mongo-2.14.0.rc1 spec/mongo/monitoring/event/server_heartbeat_started_spec.rb
mongo-2.13.1 spec/mongo/monitoring/event/server_heartbeat_started_spec.rb
mongo-2.12.4 spec/mongo/monitoring/event/server_heartbeat_started_spec.rb
mongo-2.11.6 spec/mongo/monitoring/event/server_heartbeat_started_spec.rb
mongo-2.13.0 spec/mongo/monitoring/event/server_heartbeat_started_spec.rb
mongo-2.12.3 spec/mongo/monitoring/event/server_heartbeat_started_spec.rb
mongo-2.13.0.rc1 spec/mongo/monitoring/event/server_heartbeat_started_spec.rb
mongo-2.12.2 spec/mongo/monitoring/event/server_heartbeat_started_spec.rb
mongo-2.10.5 spec/mongo/monitoring/event/server_heartbeat_started_spec.rb
mongo-2.11.5 spec/mongo/monitoring/event/server_heartbeat_started_spec.rb
mongo-2.13.0.beta1 spec/mongo/monitoring/event/server_heartbeat_started_spec.rb
mongo-2.12.1 spec/mongo/monitoring/event/server_heartbeat_started_spec.rb
mongo-2.12.0.rc0 spec/mongo/monitoring/event/server_heartbeat_started_spec.rb
mongo-2.11.4 spec/mongo/monitoring/event/server_heartbeat_started_spec.rb