From 6f2b29eeec7db931861f405bde83d15a2a018ce7 Mon Sep 17 00:00:00 2001 From: David Cook Date: Wed, 28 Feb 2024 16:16:29 +1100 Subject: [PATCH] Move rspec styleguide to separate file --- .rubocop.yml | 3 ++- .rubocop_rspec_styleguide.yml | 11 +++++++++++ .rubocop_styleguide.yml | 10 ---------- 3 files changed, 13 insertions(+), 11 deletions(-) create mode 100644 .rubocop_rspec_styleguide.yml diff --git a/.rubocop.yml b/.rubocop.yml index 4241ba03ce..937a2acf17 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -15,9 +15,10 @@ inherit_from: # The relaxed style rules as a common starting point which we can refine. - .rubocop_relaxed_styleguide.yml - # Our Open Food Network style guide. If you want to see all violations, + # Our Open Food Network style guides. If you want to see all violations, # then use only that configuration: # # bundle exec rubocop -c .rubocop_styleguide.yml # - .rubocop_styleguide.yml + - .rubocop_rspec_styleguide.yml diff --git a/.rubocop_rspec_styleguide.yml b/.rubocop_rspec_styleguide.yml new file mode 100644 index 0000000000..106cc7bce6 --- /dev/null +++ b/.rubocop_rspec_styleguide.yml @@ -0,0 +1,11 @@ +# OFN styleguide for rubocop-rspec + +RSpec/ExpectChange: + Enabled: true + EnforcedStyle: block + +RSpec/MultipleExpectations: + Max: 5 # Default 1 + +RSpec/MultipleMemoizedHelpers: + Max: 10 # Default 5 diff --git a/.rubocop_styleguide.yml b/.rubocop_styleguide.yml index baa4c15555..0264a99261 100644 --- a/.rubocop_styleguide.yml +++ b/.rubocop_styleguide.yml @@ -125,16 +125,6 @@ Rails/SkipsModelValidations: - update_column - update_columns -RSpec/ExpectChange: - Enabled: true - EnforcedStyle: block - -RSpec/MultipleExpectations: - Max: 5 # Default 1 - -RSpec/MultipleMemoizedHelpers: - Max: 10 # Default 5 - Style/Documentation: Enabled: false