mirror of
https://github.com/DatabaseCleaner/database_cleaner
synced 2023-03-27 23:22:03 -04:00
Merge pull request #129 from hck/master
Fixed condition for Moped::Truncation.clean for @only
This commit is contained in:
commit
3c61caeecb
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue