From 9b61945ee4d63e610df8a3e3a768c96adc2b8dbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Wed, 11 Aug 2021 15:34:33 +0200 Subject: [PATCH] Add and apply Lint/EmptyBlock rubocop rule It was introduced in Rubocop 1.1.0. --- .rubocop.yml | 3 +++ spec/factories/administration.rb | 3 +-- spec/factories/polls.rb | 3 +-- spec/models/poll/poll_spec.rb | 3 +-- spec/system/emails_spec.rb | 3 +-- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index f9bdb2d3b..d53c4f660 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -163,6 +163,9 @@ Lint/ConstantDefinitionInBlock: Lint/DuplicateMethods: Enabled: true +Lint/EmptyBlock: + Enabled: true + Lint/EmptyFile: Enabled: true diff --git a/spec/factories/administration.rb b/spec/factories/administration.rb index c49e06881..a59f30776 100644 --- a/spec/factories/administration.rb +++ b/spec/factories/administration.rb @@ -91,8 +91,7 @@ FactoryBot.define do end end - factory :widget_feed, class: "Widget::Feed" do - end + factory :widget_feed, class: "Widget::Feed" factory :i18n_content, class: "I18nContent" do key { "debates.index.section_footer.description" } diff --git a/spec/factories/polls.rb b/spec/factories/polls.rb index 42e1a1dc6..2d07fcb2c 100644 --- a/spec/factories/polls.rb +++ b/spec/factories/polls.rb @@ -214,6 +214,5 @@ FactoryBot.define do end end - factory :active_poll do - end + factory :active_poll end diff --git a/spec/models/poll/poll_spec.rb b/spec/models/poll/poll_spec.rb index 1223e53d6..90f3a8b0c 100644 --- a/spec/models/poll/poll_spec.rb +++ b/spec/models/poll/poll_spec.rb @@ -36,8 +36,7 @@ describe Poll do expect(poll).not_to be_valid end - it "no overlapping polls for proposal polls are allowed" do - end + pending "no overlapping polls for proposal polls are allowed" end describe "proposal polls specific validations" do diff --git a/spec/system/emails_spec.rb b/spec/system/emails_spec.rb index 22f9173dc..d23512ba0 100644 --- a/spec/system/emails_spec.rb +++ b/spec/system/emails_spec.rb @@ -316,8 +316,7 @@ describe "Emails" do expect { open_last_email }.to raise_error "No email has been sent!" end - xscenario "Delete all Notifications included in the digest after email sent" do - end + xscenario "Delete all Notifications included in the digest after email sent" end context "User invites" do