Sha256: 0aae035cf2573e8a13bdb9ca1ed5f80a23f60415ecaa59503b1c48df7d1371b4

Contents?: true

Size: 245 Bytes

Versions: 31

Compression:

Stored size: 245 Bytes

Contents

module MongoDoc
  module DatabaseCleaner
    extend self

    def clean_database
      MongoDoc::Connection.database.collections.select {|c| c.name !~ /^system/}.each {|c| MongoDoc::Connection.database.drop_collection(c.name)}
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
mongo_doc-0.6.34 lib/mongo_doc/database_cleaner.rb
mongo_doc-0.6.33 lib/mongo_doc/database_cleaner.rb
mongo_doc-0.6.32 lib/mongo_doc/database_cleaner.rb
mongo_doc-0.6.31 lib/mongo_doc/database_cleaner.rb
mongo_doc-0.6.30 lib/mongo_doc/database_cleaner.rb
mongo_doc-0.6.29 lib/mongo_doc/database_cleaner.rb
mongo_doc-0.6.28 lib/mongo_doc/database_cleaner.rb
mongo_doc-0.6.27 lib/mongo_doc/database_cleaner.rb
mongo_doc-0.6.26 lib/mongo_doc/database_cleaner.rb
mongo_doc-0.6.25 lib/mongo_doc/database_cleaner.rb
mongo_doc-0.6.23 lib/mongo_doc/database_cleaner.rb
mongo_doc-0.6.22 lib/mongo_doc/database_cleaner.rb
mongo_doc-0.6.21 lib/mongo_doc/database_cleaner.rb
mongo_doc-0.6.20 lib/mongo_doc/database_cleaner.rb
mongo_doc-0.6.19 lib/mongo_doc/database_cleaner.rb
mongo_doc-0.6.18 lib/mongo_doc/database_cleaner.rb
mongo_doc-0.6.17 lib/mongo_doc/database_cleaner.rb
mongo_doc-0.6.16 lib/mongo_doc/database_cleaner.rb
mongo_doc-0.6.15 lib/mongo_doc/database_cleaner.rb
mongo_doc-0.6.14 lib/mongo_doc/database_cleaner.rb