Sha256: 6898d3f503a099afebd67a3290e9e2d284ff3446048abc3aad71a950b6d9f855

Contents?: true

Size: 646 Bytes

Versions: 12

Compression:

Stored size: 646 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
  let(:host) { ENV["BOXEN_MONGODB_HOST"] || '127.0.0.1' }
  let(:port) { ENV["BOXEN_MONGODB_PORT"] || 27017 }

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

  subject { described_class.new(collection) }

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

  it_should_behave_like 'a flipper adapter'
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
flipper-mongo-0.10.2 spec/flipper/adapters/mongo_spec.rb
flipper-mongo-0.10.1 spec/flipper/adapters/mongo_spec.rb
flipper-mongo-0.10.0 spec/flipper/adapters/mongo_spec.rb
flipper-mongo-0.9.2 spec/flipper/adapters/mongo_spec.rb
flipper-mongo-0.9.1 spec/flipper/adapters/mongo_spec.rb
flipper-mongo-0.9.0 spec/flipper/adapters/mongo_spec.rb
flipper-mongo-0.9.0.beta1 spec/flipper/adapters/mongo_spec.rb
flipper-mongo-0.8.0 spec/flipper/adapters/mongo_spec.rb
flipper-mongo-0.7.5 spec/flipper/adapters/mongo_spec.rb
flipper-mongo-0.7.4 spec/flipper/adapters/mongo_spec.rb
flipper-mongo-0.7.3 spec/flipper/adapters/mongo_spec.rb
flipper-mongo-0.7.2 spec/flipper/adapters/mongo_spec.rb