Sha256: f9bc60bb044815500aa02802358cd4046a4dabb6d978ff8b59bec370512381d7
Contents?: true
Size: 937 Bytes
Versions: 2
Compression:
Stored size: 937 Bytes
Contents
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib', 'mongo-proxy')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'rubygems' require 'rspec' require 'mocha/api' require 'pp' require 'mongo' require 'mongo-proxy' RSpec.configure do |config| config.mock_with :mocha config.fail_fast = true end def asset filename IO.read('spec/asset/' + filename) end def mongo host = 'localhost' port = 27018 $mongo ||= Mongo::Connection.new(host, port) end TEST_DB = 'mongo_proxy_test' def mongotestdb $db ||= mongo[TEST_DB] end begin mongotestdb rescue Exception => e puts ":: Could not connect to mongo testing instance at host: #{$config['mongo']['backend_host']} port: #{$config['mongo']['backend_port']} db name: #{$config['mongo']['default_db']} to start this instance you can run: make start_mongo" exit end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mongo-proxy-1.0.1 | spec/spec_helper.rb |
mongo-proxy-1.0.0 | spec/spec_helper.rb |