Sha256: 6382a123cb56f17a8325145ce29a03e256c788ddf3769584d8aec7abfb3bed4a

Contents?: true

Size: 608 Bytes

Versions: 1

Compression:

Stored size: 608 Bytes

Contents

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

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

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}"], :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

1 entries across 1 versions & 1 rubygems

Version Path
flipper-mongo-0.7.1 spec/flipper/adapters/mongo_spec.rb