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:
Ben Mabey 2011-03-08 19:16:31 -07:00
commit c5ddac1847
1 changed files with 1 additions and 1 deletions

View File

@ -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