Sha256: 50ea12114113fc756e035b668aaeee1acbf5d49f61ae357bdc6b49a265d5f2bd

Contents?: true

Size: 530 Bytes

Versions: 7

Compression:

Stored size: 530 Bytes

Contents

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

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

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
flipper-mongo-0.10.2 test/adapters/mongo_test.rb
flipper-mongo-0.10.1 test/adapters/mongo_test.rb
flipper-mongo-0.10.0 test/adapters/mongo_test.rb
flipper-mongo-0.9.2 test/adapters/mongo_test.rb
flipper-mongo-0.9.1 test/adapters/mongo_test.rb
flipper-mongo-0.9.0 test/adapters/mongo_test.rb
flipper-mongo-0.9.0.beta1 test/adapters/mongo_test.rb