spec/flipper/adapters/mongo_spec.rb in flipper-mongo-0.7.0 vs spec/flipper/adapters/mongo_spec.rb in flipper-mongo-0.7.1

- old
+ new

@@ -3,11 +3,14 @@ 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(["127.0.0.1:#{ENV["BOXEN_MONGODB_PORT"] || 27017}"], :database => 'testing')['testing'] + Mongo::Client.new(["#{host}:#{port}"], :database => 'testing')['testing'] } subject { described_class.new(collection) } before do