spec/runners/gridfs.rb
def clear_collections(fs)
        fs.files_collection.delete_many
        fs.files_collection.indexes.drop_all rescue nil
        fs.chunks_collection.delete_many
        fs.chunks_collection.indexes.drop_all rescue nil
        #@operation.clear_collections(fs)
      end
# Clear the files and chunks collection in the FSBucket and other collections used in the test.
#
# @example Clear the test collections
#   test.clear_collections(fs)
#
# @param [ Mongo::Grid::FSBucket ] fs The Grid::FSBucket whose collections should be cleared.
#
# @since 2.1.0
Clear the files and chunks collection in the FSBucket and other collections used in the test.
Clear the files and chunks collection in the FSBucket and other collections used in the test .
def clear_collections(fs)
        fs.files_collection.delete_many
        fs.files_collection.indexes.drop_all rescue nil
        fs.chunks_collection.delete_many
        fs.chunks_collection.indexes.drop_all rescue nil
      end
def clear_collections ( fs ) fs . files_collection . delete_many fs . files_collection . indexes . drop_all rescue nil fs . chunks_collection . delete_many fs . chunks_collection . indexes . drop_all rescue nil end
Clear the files and chunks collection in the FSBucket and other collections used in the test.
Clear the files and chunks collection in the FSBucket and other collections used in the test .
#@operation.clear_collections(fs)
fs
fs The Grid::FSBucket whose collections should be cleared.
fs The Grid :: FSBucket whose collections should be cleared .
example
Clear the test collections test.clear_collections(fs)
Clear the test collections test . clear_collections ( fs )
since
None