Sha256: 81a563d96ddb05b8254f4d4169915de58b02cf6b7ed0e86081e7d4dabac3110e
Contents?: true
Size: 553 Bytes
Versions: 12
Compression:
Stored size: 553 Bytes
Contents
# frozen_string_literal: true namespace :factory_bot do desc 'Verify that all FactoryBot factories are valid' task lint: :environment do if Rails.env.test? require 'database_cleaner' sh 'bundle exec rails db:migrate' DatabaseCleaner.clean_with :truncation DatabaseCleaner.strategy = :transaction DatabaseCleaner.cleaning do FactoryBot.lint(traits: true) end else system('bundle exec rake factory_bot:lint RAILS_ENV=test') raise if $CHILD_STATUS.exitstatus.nonzero? end end end
Version data entries
12 entries across 12 versions & 1 rubygems