diff --git a/config/config.yml.example b/config/config.yml.example index 86500145..226cc4b5 100644 --- a/config/config.yml.example +++ b/config/config.yml.example @@ -15,6 +15,10 @@ defaults: &defaults ichain: enabled: false + # Set it to false if you don't want FactoryGirl lint to run before every test suit. + # You can run lint manually with: bundle exec rake factory_girl:lint + factory_girl_lint: true + development: <<: *defaults diff --git a/spec/support/factory_girl.rb b/spec/support/factory_girl.rb new file mode 100644 index 00000000..51f4037c --- /dev/null +++ b/spec/support/factory_girl.rb @@ -0,0 +1,7 @@ +RSpec.configure do |config| + + config.before(:suite) do + FactoryGirl.lint if CONFIG['factory_girl_lint'] + end + +end