From 57d925a7decfec6f5716e4833c6009fbeaf1a9c3 Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Mon, 22 Jun 2020 12:19:19 +0100 Subject: [PATCH] Add new rubocop rules and fix the single offence --- .rubocop_styleguide.yml | 6 ++++++ spec/models/spree/tax_rate_spec.rb | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.rubocop_styleguide.yml b/.rubocop_styleguide.yml index eb73f8a511..f592e4eb31 100644 --- a/.rubocop_styleguide.yml +++ b/.rubocop_styleguide.yml @@ -40,6 +40,12 @@ Layout/MultilineMethodCallIndentation: Layout/LineLength: Max: 100 +Lint/RaiseException: + Enabled: true + +Lint/StructNewOverride: + Enabled: true + ## TEMPORARY/CONTESTED SETTINGS # # These are still to be decided upon, but recommended for inclusion by diff --git a/spec/models/spree/tax_rate_spec.rb b/spec/models/spree/tax_rate_spec.rb index e2f7e7eb65..888b25c890 100644 --- a/spec/models/spree/tax_rate_spec.rb +++ b/spec/models/spree/tax_rate_spec.rb @@ -61,7 +61,7 @@ module Spree it "restores both values when an exception is raised" do expect do - tax_rate.send(:with_tax_included_in_price) { raise Exception, 'oops' } + tax_rate.send(:with_tax_included_in_price) { raise StandardError, 'oops' } end.to raise_error 'oops' expect(tax_rate.included_in_price).to be false