Sha256: 1f408913efa24430e47caa3b33a12bf6429dea3018fd4069a35c69ad1d764e1f

Contents?: true

Size: 452 Bytes

Versions: 18

Compression:

Stored size: 452 Bytes

Contents

require 'database_cleaner'

# https://github.com/DatabaseCleaner/database_cleaner/issues/409
# https://docs.mongodb.org/v3.0/reference/command/listCollections/#dbcmd.listCollections
module DatabaseCleaner
  module Mongoid
    class Truncation

      private

      def collections
        if db != :default
          database.use(db)
        end

        database.collections.collect { |c| c.namespace.split('.', 2)[1] }
      end

    end
  end
end


Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
locomotivecms-3.3.0 spec/support/database_cleaner.rb
locomotivecms-3.3.0.rc3 spec/support/database_cleaner.rb
locomotivecms-3.3.0.rc2 spec/support/database_cleaner.rb
locomotivecms-3.1.2 spec/support/database_cleaner.rb
locomotivecms-3.2.1 spec/support/database_cleaner.rb
locomotivecms-3.3.0.rc1 spec/support/database_cleaner.rb
locomotivecms-3.2.0 spec/support/database_cleaner.rb
locomotivecms-3.2.0.rc2 spec/support/database_cleaner.rb
locomotivecms-3.2.0.rc1 spec/support/database_cleaner.rb
locomotivecms-3.1.1 spec/support/database_cleaner.rb
locomotivecms-3.1.0 spec/support/database_cleaner.rb
locomotivecms-3.1.0.rc3 spec/support/database_cleaner.rb
locomotivecms-3.1.0.rc2 spec/support/database_cleaner.rb
locomotivecms-3.1.0.rc1 spec/support/database_cleaner.rb
locomotivecms-3.0.1 spec/support/database_cleaner.rb
locomotivecms-3.0.0 spec/support/database_cleaner.rb
locomotivecms-3.0.0.rc7 spec/support/database_cleaner.rb
locomotivecms-3.0.0.rc6 spec/support/database_cleaner.rb