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

@@ -16,7 +16,6 @@ shared_examples "documentable" do |documentable_factory_name, documentable_path,
end
context "Show documents" do
scenario "Download action should be able to anyone" do
visit send(documentable_path, arguments)
@@ -36,7 +35,6 @@ shared_examples "documentable" do |documentable_factory_name, documentable_path,
end
describe "Destroy action" do
scenario "Should not be able when no user logged in" do
visit send(documentable_path, arguments)
@@ -63,7 +61,6 @@ shared_examples "documentable" do |documentable_factory_name, documentable_path,
expect(page).not_to have_link("Delete document")
end
end
describe "When allow attached documents setting is enabled" do
@@ -101,11 +98,9 @@ shared_examples "documentable" do |documentable_factory_name, documentable_path,
expect(page).not_to have_css("#documents")
end
end
end
context "Destroy" do
scenario "Should show success notice after successful document upload" do
login_as documentable.author
@@ -143,9 +138,7 @@ shared_examples "documentable" do |documentable_factory_name, documentable_path,
expect(page).to have_selector "h1", text: documentable.title
end
end
end
end
def attach_document(path, success = true)