Sha256: c27a162478813f696b7441744708b20eb34cdfec4fd315f944a44c4e15d7ccee

Contents?: true

Size: 670 Bytes

Versions: 31

Compression:

Stored size: 670 Bytes

Contents

require 'test_helper'
require 'flipper/adapters/mongo'

class MongoTest < MiniTest::Test
  prepend Flipper::Test::SharedAdapterTests

  def setup
    host = ENV.fetch('MONGODB_HOST', '127.0.0.1')
    port = '27017'
    logger = Logger.new('/dev/null')
    client = Mongo::Client.new(["#{host}:#{port}"],
                               server_selection_timeout: 1,
                               database: 'testing',
                               logger: logger)
    collection = client['testing']
    begin
      collection.drop
      collection.create
    rescue Mongo::Error::OperationFailure
    end
    @adapter = Flipper::Adapters::Mongo.new(collection)
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
flipper-mongo-0.20.4 test/adapters/mongo_test.rb
flipper-mongo-0.20.3 test/adapters/mongo_test.rb
flipper-mongo-0.20.2 test/adapters/mongo_test.rb
flipper-mongo-0.20.1 test/adapters/mongo_test.rb
flipper-mongo-0.20.0 test/adapters/mongo_test.rb
flipper-mongo-0.20.0.beta3 test/adapters/mongo_test.rb
flipper-mongo-0.20.0.beta2 test/adapters/mongo_test.rb
flipper-mongo-0.20.0.beta1 test/adapters/mongo_test.rb
flipper-mongo-0.19.1 test/adapters/mongo_test.rb
flipper-mongo-0.19.0 test/adapters/mongo_test.rb
flipper-mongo-0.18.0 test/adapters/mongo_test.rb
flipper-mongo-0.17.2 test/adapters/mongo_test.rb
flipper-mongo-0.17.1 test/adapters/mongo_test.rb
flipper-mongo-0.16.2 test/adapters/mongo_test.rb
flipper-mongo-0.16.1 test/adapters/mongo_test.rb
flipper-mongo-0.16.0 test/adapters/mongo_test.rb
flipper-mongo-0.15.0 test/adapters/mongo_test.rb
flipper-mongo-0.14.0 test/adapters/mongo_test.rb
flipper-mongo-0.13.0 test/adapters/mongo_test.rb
flipper-mongo-0.13.0.beta1 test/adapters/mongo_test.rb