Sha256: 9a5efdd5c7eec2fbf1ab33bc79e58b5b3736eebd2a3a4e5d058eeb5c4ac40687
Contents?: true
Size: 437 Bytes
Versions: 21
Compression:
Stored size: 437 Bytes
Contents
module DatabaseCleaner module Mongo module TruncationMixin 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 database.collections.select { |c| c.name !~ /^system\./ } end end end end
Version data entries
21 entries across 16 versions & 4 rubygems