Change from rake Task to a single spec

This has the advantage that if you run the whole suite it gets run
automatically but if you run a single test it doesn't. This seems
like the best of both worlds..
This commit is contained in:
Daniel Schädler 2019-05-13 16:46:13 +02:00
parent 1759e9ea02
commit 9de127e75a
2 changed files with 9 additions and 8 deletions

View File

@ -1,8 +0,0 @@
# frozen_string_literal: true
namespace :factorybot do
desc 'Lint FactoryBot factories'
task lint: :environment do
FactoryBot.lint
end
end

View File

@ -0,0 +1,9 @@
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe 'FactoryBot' do
it 'has valid factories' do
FactoryBot.lint
end
end