Remove all Lint/AmbiguousRegexpLiteral rubocop issues on code, and from rubocop_todo list

This commit is contained in:
Bertocq
2017-06-16 00:11:37 +02:00
parent e6afa9473e
commit 87e73e772c
3 changed files with 4 additions and 10 deletions

View File

@@ -6,12 +6,6 @@
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
# Offense count: 3
Lint/AmbiguousRegexpLiteral:
Exclude:
- 'app/helpers/verification_helper.rb'
- 'spec/features/verification/residence_spec.rb'
# Offense count: 3
# Configuration parameters: AllowSafeAssignment.
Lint/AssignmentInCondition:

View File

@@ -7,12 +7,12 @@ module VerificationHelper
end
def mask_phone(number)
match = number.match /\d{3}$/
match = number.match(/\d{3}$/)
"******#{match}"
end
def mask_email(string)
match = string.match /^(\w{1,3})(.*)@(.*)/
match = string.match(/^(\w{1,3})(.*)@(.*)/)
data_to_display = match[1]
data_to_mask = match[2]
@@ -21,4 +21,4 @@ module VerificationHelper
data_to_display + "*"*data_to_mask.size + "@" + email_provider
end
end
end

View File

@@ -56,7 +56,7 @@ feature 'Residence' do
click_button 'Verify residence'
expect(page).to have_content /\d errors? prevented the verification of your residence/
expect(page).to have_content(/\d errors? prevented the verification of your residence/)
end
scenario 'Error on postal code not in census' do