Sha256: fc805eec56d8c48a58868e131b7e0862b595739a63e1893ce17d31160327213d

Contents?: true

Size: 814 Bytes

Versions: 35

Compression:

Stored size: 814 Bytes

Contents

require 'test_helper'

class Address; end

class MongoMapperTest < Test::Unit::TestCase  
  should "be able to write and read connection" do
    conn = XGen::Mongo::Driver::Mongo.new
    MongoMapper.connection = conn
    MongoMapper.connection.should == conn
  end
  
  should "default connection to new mongo ruby driver" do
    MongoMapper.connection = nil
    MongoMapper.connection.should be_instance_of(XGen::Mongo::Driver::Mongo)
  end
  
  should "be able to write and read default database" do
    MongoMapper.database = DefaultDatabase
    MongoMapper.database.should be_instance_of(XGen::Mongo::Driver::DB)
    MongoMapper.database.name.should == DefaultDatabase
  end
  
  should "have document not found error" do
    lambda {
      MongoMapper::DocumentNotFound
    }.should_not raise_error
  end
end

Version data entries

35 entries across 35 versions & 8 rubygems

Version Path
crnixon-mongomapper-0.2.0 test/test_mongomapper.rb
crnixon-mongomapper-0.3.4 test/unit/test_mongomapper.rb
djsun-mongomapper-0.3.1.1 test/unit/test_mongomapper.rb
djsun-mongomapper-0.3.1 test/unit/test_mongomapper.rb
djsun-mongomapper-0.3.3 test/unit/test_mongomapper.rb
fcoury-mongomapper-0.2.0 test/test_mongomapper.rb
fcoury-mongomapper-0.3.0 test/test_mongomapper.rb
fcoury-mongomapper-0.3.1 test/test_mongomapper.rb
fcoury-mongomapper-0.3.3 test/test_mongomapper.rb
fcoury-mongomapper-0.3.4 test/test_mongomapper.rb
fcoury-mongomapper-0.3.5 test/test_mongomapper.rb
fcoury-mongomapper-0.4.0 test/test_mongomapper.rb
hashrocket-mongomapper-0.3.10 test/unit/test_mongomapper.rb
hashrocket-mongomapper-0.3.11 test/unit/test_mongomapper.rb
hashrocket-mongomapper-0.3.12 test/unit/test_mongomapper.rb
hashrocket-mongomapper-0.3.13 test/unit/test_mongomapper.rb
hashrocket-mongomapper-0.3.3 test/unit/test_mongomapper.rb
hashrocket-mongomapper-0.3.4.1 test/unit/test_mongomapper.rb
hashrocket-mongomapper-0.3.4 test/unit/test_mongomapper.rb
hashrocket-mongomapper-0.3.5 test/unit/test_mongomapper.rb