Lint factories before spec suite
This also removes the rake task and implements Factory linting as before(:suite) which is not recommended by the FactoryBot guys, but we decided to implement it that way as it does not need to be configured within CI explicitly.
This commit is contained in:
parent
ea2f3a016e
commit
be89152cb1
|
|
@ -1,8 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
namespace :factorybot do
|
||||
desc 'Lint FactoryBot factories'
|
||||
task lint: :environment do
|
||||
FactoryBot.lint
|
||||
end
|
||||
end
|
||||
|
|
@ -23,6 +23,7 @@ RSpec.configure do |config|
|
|||
# assertion/expectation library such as wrong or the stdlib/minitest
|
||||
# assertions if you prefer.
|
||||
|
||||
config.before(:suite) { FactoryBot.lint }
|
||||
# only runs tests with " , focus: true "
|
||||
# config.filter_run focus: true
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue