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:
Thor77 2019-05-02 13:31:04 +02:00 committed by Malaber
parent ea2f3a016e
commit be89152cb1
2 changed files with 1 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

@ -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