From 0139b318f1419bf5266ed68ded04415361ead4eb Mon Sep 17 00:00:00 2001 From: Sean McGivern Date: Wed, 18 Oct 2017 16:03:38 +0100 Subject: [PATCH] Prevent ApplicationHelper specs from polluting later ones We don't want the locale to be set to Brazilian Portuguese for any subsequent specs! --- spec/helpers/application_helper_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 66785cf32da..7a241b02d28 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -312,9 +312,9 @@ describe ApplicationHelper do describe '#locale_path' do it 'returns the locale path with an `_`' do - Gitlab::I18n.locale = 'pt-BR' - - expect(helper.locale_path).to include('assets/locale/pt_BR/app') + Gitlab::I18n.with_locale('pt-BR') do + expect(helper.locale_path).to include('assets/locale/pt_BR/app') + end end end end