2012-04-11 15:08:04 +00:00
|
|
|
require File.expand_path("../test_helper", __FILE__)
|
2008-11-22 01:00:51 +00:00
|
|
|
|
|
|
|
class DBConnectionTest < Test::Unit::TestCase
|
|
|
|
|
2009-08-20 14:50:48 +00:00
|
|
|
include Mongo
|
2008-12-19 02:57:20 +00:00
|
|
|
|
2008-11-22 01:00:51 +00:00
|
|
|
def test_no_exceptions
|
2008-12-08 21:41:52 +00:00
|
|
|
host = ENV['MONGO_RUBY_DRIVER_HOST'] || 'localhost'
|
2009-08-20 22:48:09 +00:00
|
|
|
port = ENV['MONGO_RUBY_DRIVER_PORT'] || Connection::DEFAULT_PORT
|
2010-04-05 19:48:35 +00:00
|
|
|
db = Connection.new(host, port).db(MONGO_TEST_DB)
|
2008-11-22 01:00:51 +00:00
|
|
|
coll = db.collection('test')
|
2009-10-20 15:31:07 +00:00
|
|
|
coll.remove
|
2010-09-07 12:47:43 +00:00
|
|
|
db.get_last_error
|
2008-11-22 01:00:51 +00:00
|
|
|
end
|
|
|
|
end
|