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:
parent
bfeec78f29
commit
6f632fbc6e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue