mirror of
https://github.com/Evolix/chexpire.git
synced 2024-06-26 19:12:53 +02:00
14 lines
344 B
Ruby
14 lines
344 B
Ruby
namespace :factory_bot do
|
|
desc "Verify that all FactoryBot factories are valid"
|
|
task lint: :environment do
|
|
if Rails.env.test?
|
|
DatabaseCleaner.cleaning do
|
|
FactoryBot.lint
|
|
end
|
|
else
|
|
system("bundle exec rake factory_bot:lint RAILS_ENV='test'")
|
|
fail if $CHILD_STATUS.exitstatus.nonzero?
|
|
end
|
|
end
|
|
end
|