Merge branch 'master' of https://github.com/dmitrypol/database_cleaner into dmitrypol-master

This commit is contained in:
Ernesto Tagwerker 2015-12-27 16:29:52 -03:00
commit 82bcbde019

View file

@ -26,10 +26,12 @@ module DatabaseCleaner
database.use(db)
end
database['system.namespaces'].find(:name => { '$not' => /\.system\.|\$/ }).to_a.map do |collection|
_, name = collection['name'].split('.', 2)
name
end
database.collections.collect { |c| c.namespace.split('.',2)[1] }
# database['system.namespaces'].find(:name => { '$not' => /\.system\.|\$/ }).to_a.map do |collection|
# _, name = collection['name'].split('.', 2)
# name
# end
end
end