Add and apply rubocop rules for empty lines

We were very inconsistent regarding these rules.

Personally I prefer no empty lines around blocks, clases, etc... as
recommended by the Ruby style guide [1], and they're the default values
in rubocop, so those are the settings I'm applying.

The exception is the `private` access modifier, since we were leaving
empty lines around it most of the time. That's the default rubocop rule
as well. Personally I don't have a strong preference about this one.


[1] https://rubystyle.guide/#empty-lines-around-bodies
This commit is contained in:
Javi Martín
2019-10-24 15:48:37 +02:00
parent b6750e8f17
commit db97f9d08c
585 changed files with 24 additions and 1645 deletions

View File

@@ -1,7 +1,6 @@
require "rails_helper"
describe "System Emails" do
let(:admin) { create(:administrator) }
before do
@@ -9,7 +8,6 @@ describe "System Emails" do
end
context "Index" do
let(:system_emails_with_preview) { %w[proposal_notification_digest] }
let(:system_emails) do
%w[proposal_notification_digest budget_investment_created budget_investment_selected
@@ -19,7 +17,6 @@ describe "System Emails" do
end
context "System emails" do
scenario "have 'View' button" do
visit admin_system_emails_path
@@ -29,11 +26,9 @@ describe "System Emails" do
end
end
end
end
context "System emails with preview" do
scenario "have 'Preview Pending' and 'Send pending' buttons" do
visit admin_system_emails_path
@@ -49,11 +44,9 @@ describe "System Emails" do
end
end
end
end
context "System emails with info" do
scenario "have information about how to edit the email templates" do
visit admin_system_emails_path
@@ -69,11 +62,9 @@ describe "System Emails" do
end
end
end
end
context "View" do
let(:user) { create(:user, :level_two, username: "John Doe") }
let(:budget) { create(:budget, name: "Budget for 2019") }
let(:heading) { create(:budget_heading, budget: budget) }
@@ -267,7 +258,6 @@ describe "System Emails" do
expect(page).to have_link "Cleaner city",
href: admin_budget_budget_investment_url(investment.budget, investment, anchor: "comments")
end
end
context "Preview Pending" do
@@ -336,5 +326,4 @@ describe "System Emails" do
expect(page).to have_content("Pending notifications sent succesfully")
end
end
end