Merge pull request #48 from naumov/database_cleaner
--- As described here http://www.mongodb.org/display/DOCS/Mongo+Metadata MongoDb system collections starts with system. <-- notice the dot at the end, not just with system. This is important becouse when I have system_admins collection in my database it is not truncated. :( So here is a fix for that case.
This commit is contained in:
commit
c5ddac1847
|
@ -14,7 +14,7 @@ module DatabaseCleaner
|
|||
private
|
||||
|
||||
def collections
|
||||
database.collections.select { |c| c.name !~ /^system/ }
|
||||
database.collections.select { |c| c.name !~ /^system\./ }
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue