Sha256: 7fe127d3f9885d352f7ee85d4ec66003557de395ebe527a8a5d7907369602d04
Contents?: true
Size: 482 Bytes
Versions: 3
Compression:
Stored size: 482 Bytes
Contents
require 'database_cleaner/truncation_base' module DatabaseCleaner module Mongoid class Truncation < DatabaseCleaner::TruncationBase def clean if @only collections.each { |c| c.remove if @only.include?(c.name) } else collections.each { |c| c.remove unless @tables_to_exclude.include?(c.name) } end true end private def collections ::Mongoid.database.collections end end end end
Version data entries
3 entries across 3 versions & 2 rubygems