Commit 7cd5df5c43a6e668848ca8eafa022a181c842e52

Authored by Laust Rud Jacobsen
1 parent f9172d55
Exists in master and in 1 other branch production

Rubocop: expanding a regexp perl backref

.rubocop_todo.yml
... ... @@ -207,12 +207,6 @@ Style/PercentLiteralDelimiters:
207 207 - 'app/controllers/problems_searcher.rb'
208 208 - 'spec/models/notice_spec.rb'
209 209  
210   -# Offense count: 1
211   -# Cop supports --auto-correct.
212   -Style/PerlBackrefs:
213   - Exclude:
214   - - 'spec/acceptance/reset_password_token.rb'
215   -
216 210 # Offense count: 3
217 211 # Cop supports --auto-correct.
218 212 Style/Proc:
... ...
spec/acceptance/reset_password_token.rb
... ... @@ -20,7 +20,7 @@ feature 'password reset token' do
20 20 expect(mail.body.encoded).to match(/change your password/)
21 21 expect(mail.body.encoded).to match(regex)
22 22 if mail.body.encoded =~ regex
23   - visit "/users/password/edit?reset_password_token=#{$1}"
  23 + visit "/users/password/edit?reset_password_token=#{Regexp.last_match(1)}"
24 24 expect(page).to have_content 'Change your password'
25 25 fill_in 'New password', with: 'test12345'
26 26 fill_in 'Type your new password again', with: 'test12345'
... ...