Add rubocop spacing rules

We were following these rules in most places; we just didn't define them
anywhere.
This commit is contained in:
Javi Martín
2019-06-22 18:11:23 +02:00
parent c7f64f8493
commit f9ed186909
264 changed files with 652 additions and 577 deletions

View File

@@ -71,7 +71,7 @@ shared_examples "acts as imageable" do |imageable_factory|
image_url = image.attachment.url
new_url = "/attachments/original/missing.png"
expect{ image.attachment.destroy }.to change{ image.attachment.url }.from(image_url).to(new_url)
expect { image.attachment.destroy }.to change { image.attachment.url }.from(image_url).to(new_url)
end
end

View File

@@ -22,14 +22,14 @@ shared_examples "acts as paranoid" do |factory_name|
end
it "should be destroyed after parent resource really_destroy" do
expect{ resource.really_destroy! }.to change { resource.translations.with_deleted.count }.from(1).to(0)
expect { resource.really_destroy! }.to change { resource.translations.with_deleted.count }.from(1).to(0)
end
it "cannot be recovered through non recursive restore" do
resource.destroy
resource.reload
expect{ resource.restore }.not_to change { resource.translations.with_deleted.first.hidden_at }
expect { resource.restore }.not_to change { resource.translations.with_deleted.first.hidden_at }
end
it "can be recovered through recursive restore after non-recursive restore" do
@@ -38,7 +38,7 @@ shared_examples "acts as paranoid" do |factory_name|
resource.destroy
resource.reload
expect{ resource.restore(recursive: true) }.to change { resource.translations.with_deleted.first.hidden_at }
expect { resource.restore(recursive: true) }.to change { resource.translations.with_deleted.first.hidden_at }
end
it "can be recovered after soft deletion through recursive restore" do