Merge pull request #129 from hck/master

Fixed condition for Moped::Truncation.clean for @only
This commit is contained in:
Ben Mabey 2012-07-25 12:05:32 -07:00
commit 3c61caeecb
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ module DatabaseCleaner
def clean
if @only
collections.each { |c| session[c].find.remove_all if @only.include?(c.name) }
collections.each { |c| session[c].find.remove_all if @only.include?(c) }
else
collections.each { |c| session[c].find.remove_all unless @tables_to_exclude.include?(c) }
end