diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 1a8835018..255c65882 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -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: diff --git a/app/helpers/verification_helper.rb b/app/helpers/verification_helper.rb index 7d300c5c9..62be1a5a8 100644 --- a/app/helpers/verification_helper.rb +++ b/app/helpers/verification_helper.rb @@ -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 \ No newline at end of file +end diff --git a/spec/features/verification/residence_spec.rb b/spec/features/verification/residence_spec.rb index ed2ffd083..a94834523 100644 --- a/spec/features/verification/residence_spec.rb +++ b/spec/features/verification/residence_spec.rb @@ -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