Module: MongoDoc::DatabaseCleaner
- Extended by:
- DatabaseCleaner
- Included in:
- DatabaseCleaner
- Defined in:
- lib/mongo_doc/database_cleaner.rb
Instance Method Summary collapse
Instance Method Details
#clean_database ⇒ Object
5 6 7 |
# File 'lib/mongo_doc/database_cleaner.rb', line 5 def clean_database MongoDoc::Connection.database.collections.select {|c| c.name !~ /^system/}.each {|c| MongoDoc::Connection.database.drop_collection(c.name)} end |