spec/spec_helper.rb in mongoid_geospatial-1.0.0rc1 vs spec/spec_helper.rb in mongoid_geospatial-1.0.0

- old
+ new

@@ -17,11 +17,14 @@ if RUBY_VERSION >= '1.9.2' YAML::ENGINE.yamler = 'syck' end Mongoid.configure do |config| - name = "mongoid_geospatial_test" - config.master = Mongo::Connection.new.db(name) + opts = YAML.load(File.read(File.dirname(__FILE__) + '/support/mongoid.yml'))["test"] + name = opts.delete("database") + host = opts.delete("host") + port = opts.delete("port") + config.master = Mongo::Connection.new(host, port, opts).db(name) config.logger = nil config.allow_dynamic_fields = true end Dir[ File.join(MODELS, "*.rb") ].sort.each { |file| require File.basename(file) }