Sha256: 23694c52bb1abe2a2078f450fe6a2e88e7af65313364e3ec44f6e35a0e3adcff

Contents?: true

Size: 711 Bytes

Versions: 43

Compression:

Stored size: 711 Bytes

Contents

require 'lite_spec_helper'

describe Mongo::Monitoring::Event::CommandFailed do

  let(:address) do
    Mongo::Address.new('127.0.0.1:27017')
  end

  describe '#command_name' do
    context 'when command_name is given as a string' do
      let(:event) do
        described_class.new('find', 'admin', address, 1, 2, 'Uh oh', nil, 0.5)
      end

      it 'is a string' do
        expect(event.command_name).to eql('find')
      end
    end

    context 'when command_name is given as a symbol' do
      let(:event) do
        described_class.new(:find, 'admin', address, 1, 2, 'Uh oh', nil, 0.5)
      end

      it 'is a string' do
        expect(event.command_name).to eql('find')
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 2 rubygems

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