Sha256: ad55837f615096374053dbaec063e6b44b5b3b8dc26164957b79a252b6fbf9dc

Contents?: true

Size: 506 Bytes

Versions: 39

Compression:

Stored size: 506 Bytes

Contents

require 'spec_helper'

describe Mongo::Collection::View::Explainable do

  let(:selector) do
    {}
  end

  let(:options) do
    {}
  end

  let(:view) do
    Mongo::Collection::View.new(authorized_collection, selector, options)
  end

  before do
    authorized_collection.delete_many
  end

  describe '#explain' do

    let(:explain) do
      view.explain
    end

    it 'executes an explain' do
      expect(explain[:cursor] == 'BasicCursor' || explain[:queryPlanner]).to be_truthy
    end
  end
end

Version data entries

39 entries across 39 versions & 2 rubygems

Version Path
mongo-2.13.3 spec/mongo/collection/view/explainable_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/mongo-2.8.0/spec/mongo/collection/view/explainable_spec.rb
mongo-2.13.2 spec/mongo/collection/view/explainable_spec.rb
mongo-2.13.1 spec/mongo/collection/view/explainable_spec.rb
mongo-2.12.4 spec/mongo/collection/view/explainable_spec.rb
mongo-2.11.6 spec/mongo/collection/view/explainable_spec.rb
mongo-2.13.0 spec/mongo/collection/view/explainable_spec.rb
mongo-2.12.3 spec/mongo/collection/view/explainable_spec.rb
mongo-2.13.0.rc1 spec/mongo/collection/view/explainable_spec.rb
mongo-2.12.2 spec/mongo/collection/view/explainable_spec.rb
mongo-2.10.5 spec/mongo/collection/view/explainable_spec.rb
mongo-2.11.5 spec/mongo/collection/view/explainable_spec.rb
mongo-2.13.0.beta1 spec/mongo/collection/view/explainable_spec.rb
mongo-2.12.1 spec/mongo/collection/view/explainable_spec.rb
mongo-2.12.0.rc0 spec/mongo/collection/view/explainable_spec.rb
mongo-2.11.4 spec/mongo/collection/view/explainable_spec.rb
mongo-2.10.4 spec/mongo/collection/view/explainable_spec.rb
mongo-2.11.3 spec/mongo/collection/view/explainable_spec.rb
mongo-2.11.2 spec/mongo/collection/view/explainable_spec.rb
mongo-2.11.1 spec/mongo/collection/view/explainable_spec.rb