refactors localization spec using expect instead of global state
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user