diff --git a/test/test_helper.rb b/test/test_helper.rb index fdade7e..29906c2 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -18,8 +18,7 @@ def default_test def teardown if @table_names - client = Mongo::Client.new(['127.0.0.1:27017']) - db = Mongo::Database.new(client, :test) + db = Mongoid::Clients.default db.collections.each {|c| c.drop if @table_names.include?(c.name)} end end