Sha256: 984645a0a14305a4e7d4f31b890e8cf83b45ef86867cd81bd65776d8f50a5abf

Contents?: true

Size: 657 Bytes

Versions: 30

Compression:

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

30 entries across 30 versions & 1 rubygems

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