Sha256: 12ca4204c346ba6598e75f0e7a98b1ae1ca2bd44fd79a20c04086b7f5c0eed83

Contents?: true

Size: 658 Bytes

Versions: 1

Compression:

Stored size: 658 Bytes

Contents

require 'helper'
require 'flipper/adapters/mongo'
require 'flipper/spec/shared_adapter_specs'

Mongo::Logger.logger.level = Logger::INFO

RSpec.describe Flipper::Adapters::Mongo do
  subject { described_class.new(collection) }

  let(:host) { ENV['MONGODB_HOST'] || '127.0.0.1' }
  let(:port) { ENV['MONGODB_PORT'] || 27017 }

  let(:client) do
    Mongo::Client.new(["#{host}:#{port}"], server_selection_timeout: 1, database: 'testing')
  end
  let(:collection) { client['testing'] }

  before do
    begin
      collection.drop
    rescue Mongo::Error::OperationFailure
    end
    collection.create
  end

  #it_should_behave_like 'a flipper adapter'
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
flipper-mongo-0.20.0.beta3 spec/flipper/adapters/mongo_spec.rb