Skip to content

Instantly share code, notes, and snippets.

@yhirano55
yhirano55 / seed_fu.rake
Last active January 16, 2020 19:30
Run in CI: RAILS_ENV=test bundle exec rails db:seed_fu:lint
# lib/tasks/seed_fu/lint.rake
namespace :db do
namespace :seed_fu do
desc 'Verify that all fixtures are valid'
task lint: :environment do
if Rails.env.test?
conn = ActiveRecord::Base.connection
%w[development test production].each do |env|
conn.transaction do