Update lint example to configure DatabaseCleaner

Not specifying `strategy`/`clean_with` can lead to test data sticking
around on CI and cause unique validations to fail while the lint
process is running.
This commit is contained in:
Chris Thorn 2017-02-01 08:45:55 -08:00 committed by Daniel Colson
parent bfeec78f29
commit 6f632fbc6e
1 changed files with 1 additions and 0 deletions

View File

@ -1003,6 +1003,7 @@ namespace :factory_bot do
desc "Verify that all FactoryBot factories are valid"
task lint: :environment do
if Rails.env.test?
DatabaseCleaner.clean_with(:deletion)
DatabaseCleaner.cleaning do
FactoryBot.lint
end