Fix Style/BlockDelimiters rubocop issues and remove it from rubocop_todo list

This commit is contained in:
Bertocq
2017-06-16 00:37:58 +02:00
parent 25e501c668
commit 15c92b27c8
5 changed files with 42 additions and 38 deletions

View File

@@ -210,17 +210,6 @@ Layout/AlignParameters:
- 'spec/models/user_spec.rb'
- 'spec/rails_helper.rb'
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
# SupportedStyles: line_count_based, semantic, braces_for_chaining
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
# FunctionalMethods: let, let!, subject, watch
# IgnoredMethods: lambda, proc, it
Style/BlockDelimiters:
Exclude:
- 'spec/features/users_auth_spec.rb'
# Offense count: 2
# Cop supports --auto-correct.
Layout/BlockEndNewline:

View File

@@ -248,18 +248,21 @@ feature 'Admin polls' do
booth_assignment_recounted = create(:poll_booth_assignment, poll: poll)
booth_assignment_final_recounted = create(:poll_booth_assignment, poll: poll)
3.times { |i| create(:poll_recount,
booth_assignment: booth_assignment,
date: poll.starts_at + i.days,
count: 33) }
3.times do |i|
create(:poll_recount,
booth_assignment: booth_assignment,
date: poll.starts_at + i.days,
count: 33)
end
3.times { |i| create(:poll_final_recount,
booth_assignment: booth_assignment,
date: poll.starts_at + i.days,
count: 21) }
3.times do |i|
create(:poll_final_recount,
booth_assignment: booth_assignment,
date: poll.starts_at + i.days,
count: 21)
end
2.times { create(:poll_voter,
booth_assignment: booth_assignment_final_recounted) }
2.times { create(:poll_voter, booth_assignment: booth_assignment_final_recounted) }
create(:poll_recount,
booth_assignment: booth_assignment_recounted,
@@ -363,4 +366,4 @@ feature 'Admin polls' do
end
end
end
end

View File

@@ -337,14 +337,16 @@ feature 'Budget Investments' do
end
context "Show (feasible budget investment)" do
let(:investment) { create(:budget_investment,
:feasible,
:finished,
budget: budget,
group: group,
heading: heading,
price: 16,
price_explanation: 'Every wheel is 4 euros, so total is 16')}
let(:investment) do
create(:budget_investment,
:feasible,
:finished,
budget: budget,
group: group,
heading: heading,
price: 16,
price_explanation: 'Every wheel is 4 euros, so total is 16')
end
background do
user = create(:user)

View File

@@ -110,10 +110,12 @@ feature 'Officing Final Recount' do
booth_assignment: final_officer_assignment.booth_assignment,
date: 7.days.ago,
count: 100)
33.times { create(:poll_voter, :valid_document,
poll: poll,
booth_assignment: final_officer_assignment.booth_assignment,
created_at: final_recount.date) }
33.times do
create(:poll_voter, :valid_document,
poll: poll,
booth_assignment: final_officer_assignment.booth_assignment,
created_at: final_recount.date)
end
visit new_officing_poll_final_recount_path(poll)
within("#poll_final_recount_#{final_recount.id}") do
@@ -144,4 +146,4 @@ feature 'Officing Final Recount' do
expect(page).to have_select('date', selected: I18n.l(final_recount.date.to_date, format: :long))
end
end
end

View File

@@ -107,9 +107,17 @@ feature 'Users' do
let(:twitter_hash){ {provider: 'twitter', uid: '12345', info: {name: 'manuela'}} }
let(:twitter_hash_with_email){ {provider: 'twitter', uid: '12345', info: {name: 'manuela', email: 'manuelacarmena@example.com'}} }
let(:twitter_hash_with_verified_email){ {provider: 'twitter',
uid: '12345',
info: {name: 'manuela', email: 'manuelacarmena@example.com', verified: '1'}} }
let(:twitter_hash_with_verified_email) do
{
provider: 'twitter',
uid: '12345',
info: {
name: 'manuela',
email: 'manuelacarmena@example.com',
verified: '1'
}
}
end
scenario 'Sign up when Oauth provider has a verified email' do
OmniAuth.config.add_mock(:twitter, twitter_hash_with_verified_email)