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:
parent
1759e9ea02
commit
9de127e75a
|
|
@ -1,8 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
namespace :factorybot do
|
||||
desc 'Lint FactoryBot factories'
|
||||
task lint: :environment do
|
||||
FactoryBot.lint
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'FactoryBot' do
|
||||
it 'has valid factories' do
|
||||
FactoryBot.lint
|
||||
end
|
||||
end
|
||||
Loading…
Reference in New Issue