Fix Rails/I18nLocaleAssignment cop (#24693)
This commit is contained in:
parent
af824db398
commit
d00e45a7d3
4 changed files with 19 additions and 27 deletions
|
@ -104,9 +104,9 @@ RSpec.describe Auth::RegistrationsController, type: :controller do
|
|||
end
|
||||
|
||||
around do |example|
|
||||
current_locale = I18n.locale
|
||||
example.run
|
||||
I18n.locale = current_locale
|
||||
I18n.with_locale(I18n.locale) do
|
||||
example.run
|
||||
end
|
||||
end
|
||||
|
||||
before { request.env['devise.mapping'] = Devise.mappings[:user] }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue