Apply Layout/SpaceAroundOperators rubocop rule

We were a bit inconsistent when aligning equal signs vertically.
This commit is contained in:
Javi Martín
2019-10-10 02:46:46 +02:00
parent cc76432a97
commit aace7aea02
4 changed files with 7 additions and 5 deletions

View File

@@ -6,7 +6,7 @@ module ScoreCalculator
period = [1, [max_period, resource_age(resource)].min].max
votes_total = resource.votes_for.where("created_at >= ?", period.days.ago).count
votes_up = resource.get_upvotes.where("created_at >= ?", period.days.ago).count
votes_up = resource.get_upvotes.where("created_at >= ?", period.days.ago).count
votes_down = votes_total - votes_up
votes_score = votes_up - votes_down

View File

@@ -217,6 +217,7 @@ describe "Notifications" do
Notification.send_pending
now = Notification.first_batch_run_at
first_batch_run_at = now.change(usec: 0)
second_batch_run_at = (now + 1.second).change(usec: 0)
third_batch_run_at = (now + 2.seconds).change(usec: 0)

View File

@@ -100,6 +100,7 @@ describe Newsletter do
newsletter.deliver
now = newsletter.first_batch_run_at
first_batch_run_at = now.change(usec: 0)
second_batch_run_at = (now + 1.second).change(usec: 0)
third_batch_run_at = (now + 2.seconds).change(usec: 0)

View File

@@ -607,11 +607,11 @@ describe Proposal do
end
it "orders by weight and then by votes" do
title_some_votes = create(:proposal, title: "stop corruption", cached_votes_up: 5)
title_least_voted = create(:proposal, title: "stop corruption", cached_votes_up: 2)
title_most_voted = create(:proposal, title: "stop corruption", cached_votes_up: 10)
title_some_votes = create(:proposal, title: "stop corruption", cached_votes_up: 5)
title_least_voted = create(:proposal, title: "stop corruption", cached_votes_up: 2)
title_most_voted = create(:proposal, title: "stop corruption", cached_votes_up: 10)
summary_most_voted = create(:proposal, summary: "stop corruption", cached_votes_up: 10)
summary_most_voted = create(:proposal, summary: "stop corruption", cached_votes_up: 10)
results = Proposal.search("stop corruption")