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 "Verify email" do
scenario "Verify" do
user = create(:user,
residence_verified_at: Time.current,

View File

@@ -1,7 +1,6 @@
require "rails_helper"
describe "Verify Letter" do
scenario "Request a letter" do
user = create(:user, residence_verified_at: Time.current,
confirmed_phone: "611111111")
@@ -41,7 +40,6 @@ describe "Verify Letter" do
end
context "Code verification" do
scenario "Valid verification user logged in" do
user = create(:user, residence_verified_at: Time.current,
confirmed_phone: "611111111",
@@ -129,6 +127,5 @@ describe "Verify Letter" do
expect(page).to have_content "You have reached the maximum number of attempts. Please try again later."
expect(page).to have_current_path(account_path)
end
end
end

View File

@@ -1,7 +1,6 @@
require "rails_helper"
describe "Level two verification" do
scenario "Verification with residency and sms" do
create(:geozone)
user = create(:user)
@@ -38,5 +37,4 @@ describe "Level two verification" do
verify_residence
end
end
end

View File

@@ -1,7 +1,6 @@
require "rails_helper"
describe "Residence" do
before { create(:geozone) }
scenario "Verify resident" do

View File

@@ -1,7 +1,6 @@
require "rails_helper"
describe "SMS Verification" do
scenario "Verify" do
user = create(:user, residence_verified_at: Time.current)
login_as(user)
@@ -76,5 +75,4 @@ describe "SMS Verification" do
expect(page).to have_content "You have reached the maximum number of attempts. Please try again later."
expect(page).to have_current_path(account_path)
end
end

View File

@@ -1,7 +1,6 @@
require "rails_helper"
describe "Verification path" do
scenario "User is an organization" do
user = create(:user, verified_at: Time.current)
create(:organization, user: user)
@@ -98,5 +97,4 @@ describe "Verification path" do
expect(page).to have_content "Your account is already verified"
end
end
end

View File

@@ -1,7 +1,6 @@
require "rails_helper"
describe "Verified users" do
scenario "Verified emails" do
user = create(:user,
residence_verified_at: Time.current,
@@ -133,5 +132,4 @@ describe "Verified users" do
expect(page).to have_current_path(new_sms_path)
end
end