Browse files

use Mongo::Connection instead of deprecated Mongo::Mongo

  • Loading branch information...
1 parent 110713d commit 5336f2a29ff418feea97891469325f9115ce1b97 Mike Dirolf committed Aug 26, 2009
Showing with 2 additions and 2 deletions.
  1. +1 −1 init.rb
  2. +1 −1 test/test_helper.rb
View
2 init.rb
@@ -13,7 +13,7 @@
end
require 'mongo_record/pk_factory'
- $db = Mongo::Mongo.new(db_config['host'], db_config['port']).db(db_config['database'], :pk => MongoRecord::PKFactory.new)
+ $db = Mongo::Connection.new(db_config['host'], db_config['port']).db(db_config['database'], :pk => MongoRecord::PKFactory.new)
# require this after the DB is set up, otherwise ActiveRecord::Base.connection.db does not
# get populated
require 'mongo_record'
View
2 test/test_helper.rb
@@ -7,5 +7,5 @@
# Tell Mongo adapter where to find schema file for testing.
ENV['SCHEMA'] = File.join(File.dirname(__FILE__), 'schema.rb')
-$mongo = Mongo::Mongo.new(ENV['MONGO_RUBY_DRIVER_HOST'], ENV['MONGO_RUBY_DRIVER_PORT'])
+$mongo = Mongo::Connection.new(ENV['MONGO_RUBY_DRIVER_HOST'], ENV['MONGO_RUBY_DRIVER_PORT'])
$db = $mongo.db('activerecord-mongo-adapter-test', :pk => MongoRecord::PKFactory.new)

0 comments on commit 5336f2a

Please sign in to comment.