Sha256: e0f7d1b69fbb34cba5f3b000cc341f6a7c964741828401e39a3a90830206fa86

Contents?: true

Size: 1.21 KB

Versions: 19

Compression:

Stored size: 1.21 KB

Contents

require 'spec_helper'

describe 'CRUD' do

  CRUD_TESTS.each do |file|

    spec = Mongo::CRUD::Spec.new(file)

    context(spec.description) do

      spec.tests.each do |test|

        context(test.description) do

          before(:each) do
            authorized_collection.delete_many
          end

          after(:each) do
            authorized_collection.delete_many
          end

          let(:results) do
            test.run(authorized_collection)
          end

          it "returns the correct result" do
            skip 'Test results only match with server version >= 2.6' if test.requires_2_6?(write_command_enabled?,
                                                                                            authorized_collection)
            expect(results).to eq(test.result)
          end

          it 'has the correct data in the collection' do
            skip 'Test results only match with server version >= 2.6' if test.requires_2_6?(write_command_enabled?,
                                                                                            authorized_collection)
            expect(test.run(authorized_collection)).to match_collection_data(test)
          end
        end
      end
    end
  end
end

Version data entries

19 entries across 18 versions & 3 rubygems

Version Path
mongo-2.3.1 spec/mongo/crud_spec.rb
mongo-2.3.0 spec/mongo/crud_spec.rb
mongo-2.2.7 spec/mongo/crud_spec.rb
mongo-2.2.6 spec/mongo/crud_spec.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/mongo-2.2.5/spec/mongo/crud_spec.rb
mongo-2.2.5 spec/mongo/crud_spec.rb
mongo-2.2.4 spec/mongo/crud_spec.rb
mongo-2.2.3 spec/mongo/crud_spec.rb
mongo-2.2.2 spec/mongo/crud_spec.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/mongo-2.2.1/spec/mongo/crud_spec.rb
tdiary-4.2.1 vendor/bundle/ruby/2.3.0/gems/mongo-2.2.1/spec/mongo/crud_spec.rb
mongo-2.2.1 spec/mongo/crud_spec.rb
mongo-2.2.0 spec/mongo/crud_spec.rb
mongo-2.2.0.rc0 spec/mongo/crud_spec.rb
mongo-2.1.2 spec/mongo/crud_spec.rb
mongo-2.1.1 spec/mongo/crud_spec.rb
mongo-2.1.0 spec/mongo/crud_spec.rb
mongo-2.1.0.rc0 spec/mongo/crud_spec.rb
mongo-2.1.0.beta spec/mongo/crud_spec.rb