From f4a6830a1b9ffceff9bd46b458ac1b17951fd3d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sun, 27 Sep 2020 20:56:33 +0200 Subject: [PATCH] Add and appy RSpec/RepeatedExampleGroupBody rule This rule is available since rubocop-rspec 1.38.0. Thanks to it, we've found out we were testing topics behave like notifiable twice. --- .rubocop.yml | 3 +++ spec/models/topic_spec.rb | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 1e4ff93cb..70df9a03e 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -365,6 +365,9 @@ RSpec/OverwritingSetup: RSpec/RepeatedExample: Enabled: true +RSpec/RepeatedExampleGroupBody: + Enabled: true + RSpec/ScatteredLet: Enabled: true diff --git a/spec/models/topic_spec.rb b/spec/models/topic_spec.rb index 05d25587a..801e246c1 100644 --- a/spec/models/topic_spec.rb +++ b/spec/models/topic_spec.rb @@ -68,8 +68,4 @@ describe Topic do expect(results).to eq [topic1, topic2, topic3] end end - - describe "notifications" do - it_behaves_like "notifiable" - end end