diff --git a/spec/features/localization_spec.rb b/spec/features/localization_spec.rb index ddea1e38b..810d07503 100644 --- a/spec/features/localization_spec.rb +++ b/spec/features/localization_spec.rb @@ -34,13 +34,10 @@ feature 'Localization' do end scenario 'Locale switcher not present if only one locale' do - initial_locales = I18n.available_locales - I18n.available_locales = [:en] + expect(I18n).to receive(:available_locales).and_return([:en]) visit '/' expect(page).to_not have_content('Language') expect(page).to_not have_css('div.locale') - - I18n.available_locales = initial_locales end end