Sha256: 97e5ce02c9093ff64d1cf797bd88635288b8347dd63b2b0de6e30fc2e14f414d

Contents?: true

Size: 523 Bytes

Versions: 8

Compression:

Stored size: 523 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

  after do
    authorized_collection.find.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

8 entries across 8 versions & 1 rubygems

Version Path
mongo-2.0.6 spec/mongo/collection/view/explainable_spec.rb
mongo-2.0.5 spec/mongo/collection/view/explainable_spec.rb
mongo-2.0.4 spec/mongo/collection/view/explainable_spec.rb
mongo-2.0.3 spec/mongo/collection/view/explainable_spec.rb
mongo-2.0.2 spec/mongo/collection/view/explainable_spec.rb
mongo-2.0.1 spec/mongo/collection/view/explainable_spec.rb
mongo-2.0.0 spec/mongo/collection/view/explainable_spec.rb
mongo-2.0.0.rc spec/mongo/collection/view/explainable_spec.rb