Created
January 18, 2014 10:28
-
-
Save mtkd/8488633 to your computer and use it in GitHub Desktop.
Revisions
-
mtkd created this gist
Jan 18, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ # not obvious from the database_cleaner documentation # this is snippets of relevant parts, it's not meant to run require 'mongo' require 'database_cleaner' require 'database_cleaner/mongo/base' include Mongo @mongo_client = MongoClient.new DatabaseCleaner[:mongo].strategy = :truncation DatabaseCleaner[:mongo].db = @mongo_client.db("default") module MiniTest class Spec def setup DatabaseCleaner.start end def teardown DatabaseCleaner.clean end end end