diff --git a/tests/test_admin.rb b/tests/test_admin.rb index f512557..15a0492 100644 --- a/tests/test_admin.rb +++ b/tests/test_admin.rb @@ -22,6 +22,7 @@ class AdminTest < Test::Unit::TestCase def teardown @admin.profiling_level = :off @@coll.clear if @@coll + @@db.error end def test_default_profiling_level diff --git a/tests/test_chunk.rb b/tests/test_chunk.rb index e4a5b10..b7dcdd8 100644 --- a/tests/test_chunk.rb +++ b/tests/test_chunk.rb @@ -24,6 +24,7 @@ class ChunkTest < Test::Unit::TestCase def teardown @@chunks.clear @@files.clear + @@db.error end def test_pos diff --git a/tests/test_cursor.rb b/tests/test_cursor.rb index 7e7ed9a..7446259 100644 --- a/tests/test_cursor.rb +++ b/tests/test_cursor.rb @@ -19,6 +19,7 @@ class CursorTest < Test::Unit::TestCase def teardown @@coll.clear + @@db.error end def test_explain diff --git a/tests/test_db.rb b/tests/test_db.rb index b10068a..e403887 100644 --- a/tests/test_db.rb +++ b/tests/test_db.rb @@ -29,6 +29,7 @@ class DBTest < Test::Unit::TestCase def teardown @@users.clear if @@users + @@db.error end def test_close diff --git a/tests/test_db_api.rb b/tests/test_db_api.rb index 5d2e089..be0ba7e 100644 --- a/tests/test_db_api.rb +++ b/tests/test_db_api.rb @@ -19,6 +19,7 @@ class DBAPITest < Test::Unit::TestCase def teardown @@coll.clear + @@db.error end def test_clear diff --git a/tests/test_db_connection.rb b/tests/test_db_connection.rb index da8ff99..dab44bc 100644 --- a/tests/test_db_connection.rb +++ b/tests/test_db_connection.rb @@ -13,5 +13,6 @@ class DBConnectionTest < Test::Unit::TestCase db = Mongo.new(host, port).db('ruby-mongo-demo') coll = db.collection('test') coll.clear + db.error end end diff --git a/tests/test_grid_store.rb b/tests/test_grid_store.rb index 2aa33e0..b8b8ec1 100644 --- a/tests/test_grid_store.rb +++ b/tests/test_grid_store.rb @@ -22,6 +22,7 @@ class GridStoreTest < Test::Unit::TestCase def teardown @@chunks.clear @@files.clear + @@db.error end def test_exist diff --git a/tests/test_mongo.rb b/tests/test_mongo.rb index f50906a..c03e089 100644 --- a/tests/test_mongo.rb +++ b/tests/test_mongo.rb @@ -13,6 +13,10 @@ class MongoTest < Test::Unit::TestCase @mongo = Mongo.new(@host, @port) end + def teardown + @mongo.db('ruby-mongo-test').error + end + def test_database_info @mongo.drop_database('ruby-mongo-info-test') @mongo.db('ruby-mongo-info-test').collection('info-test').insert('a' => 1)