Sha256: 67e48342bd4328884672d210a302d1da26fb02e192de5d639daa260bcf4c89e5

Contents?: true

Size: 482 Bytes

Versions: 12

Compression:

Stored size: 482 Bytes

Contents

$LOAD_PATH[0,0] = File.join(File.dirname(__FILE__), '..', 'lib')
require 'mongo'
require 'test/unit'

# NOTE: assumes Mongo is running
class DBConnectionTest < Test::Unit::TestCase

  include XGen::Mongo::Driver

  def test_no_exceptions
    host = ENV['MONGO_RUBY_DRIVER_HOST'] || 'localhost'
    port = ENV['MONGO_RUBY_DRIVER_PORT'] || Mongo::DEFAULT_PORT
    db = Mongo.new(host, port).db('ruby-mongo-demo')
    coll = db.collection('test')
    coll.clear
    db.error
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
animehunter-mongo-0.9 tests/test_db_connection.rb
mongodb-mongo-0.10.1 tests/test_db_connection.rb
mongodb-mongo-0.10 tests/test_db_connection.rb
mongodb-mongo-0.11.1 tests/test_db_connection.rb
mongodb-mongo-0.11 tests/test_db_connection.rb
mongodb-mongo-0.12 tests/test_db_connection.rb
mongodb-mongo-0.6.5 tests/test_db_connection.rb
mongodb-mongo-0.6.6 tests/test_db_connection.rb
mongodb-mongo-0.6.7 tests/test_db_connection.rb
mongodb-mongo-0.7 tests/test_db_connection.rb
mongodb-mongo-0.8 tests/test_db_connection.rb
mongodb-mongo-0.9 tests/test_db_connection.rb