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 "Admin download settings" do
before do
admin = create(:administrator)
login_as(admin.user)
@@ -30,7 +29,6 @@ describe "Admin download settings" do
end
context "Download debates" do
before do
create(:debate)
end
@@ -83,13 +81,11 @@ describe "Admin download settings" do
end
context "Download proposals" do
before do
create(:proposal)
end
scenario "admin csv" do
visit admin_proposals_path
click_button "Download"
@@ -121,7 +117,6 @@ describe "Admin download settings" do
end
scenario "Update download settings comments" do
visit admin_edit_download_settings_path(resource: "comments")
find(:css, "#downloadable_[value='id']").set(true)
@@ -155,11 +150,9 @@ describe "Admin download settings" do
visit admin_edit_download_settings_path(resource: "legislation_processes")
expect(page).to have_content("Legislation process")
end
scenario "Update download settings legislation process" do
visit admin_edit_download_settings_path(resource: "legislation_processes")
find(:css, "#downloadable_[value='id']").set(true)
@@ -176,14 +169,12 @@ describe "Admin download settings" do
end
context "Download legislation process" do
before do
create(:legislation_process, :open)
create(:legislation_process, :published)
end
scenario "admin csv" do
visit admin_legislation_processes_path
click_button "Download"
@@ -212,11 +203,9 @@ describe "Admin download settings" do
visit admin_edit_download_settings_path(resource: "budget_investments")
expect(page).to have_content("Participatory budgeting")
end
scenario "Update download settings budget investment results" do
visit admin_edit_download_settings_path(resource: "budget_investments")
find(:css, "#downloadable_[value='id']").set(true)
@@ -236,11 +225,9 @@ describe "Admin download settings" do
visit admin_edit_download_settings_path(resource: "budget_investments", config: 1)
expect(page).to have_content("Participatory budgeting - Milestones")
end
scenario "Update download settings budget investment milestones" do
visit admin_edit_download_settings_path(resource: "budget_investments", config: 1)
find(:css, "#downloadable_[value='id']").set(true)
@@ -319,5 +306,4 @@ describe "Admin download settings" do
expect(content_type).to match("text/csv")
end
end
end