refactors localization spec using expect instead of global state

This commit is contained in:
kikito
2015-10-20 19:08:52 +02:00
parent b27c91f40b
commit b6af10a91f

View File

@@ -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