Sha256: 2aa45d09acaacb085f48e409acbbfc4ae1a483b54e10ac17bda1230bc1b9f2cf

Contents?: true

Size: 478 Bytes

Versions: 6

Compression:

Stored size: 478 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 Mongo

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

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
mongodb-mongo-0.13 test/test_db_connection.rb
mongodb-mongo-0.14.1 test/test_db_connection.rb
mongodb-mongo-0.14 test/test_db_connection.rb
pahagon-mongo-abd-0.14.1 test/test_db_connection.rb
mongo-0.15.1 test/test_db_connection.rb
mongo-0.15 test/test_db_connection.rb