diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-07-18 17:10:31 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-07-18 17:43:26 +0100 |
commit | bc0a6d54c4e5f3673a761ca434c49cbfebb89b09 (patch) | |
tree | ac7165739b51316122040be55d8ed5561f440ddf /spec/spec_helper.rb | |
parent | 9fe48c5b9db1c0ba6c1a59f0d092c88e5cae1aa0 (diff) |
Extract code for setting locales in FastGettext and I18n
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index c7fb0af75..7e3df4f39 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -88,12 +88,9 @@ Spork.prefork do # ApplicationController#set_gettext_locale which sets the locale and so you may be setting # the locale in your tests and not even realising it. So, let's make things easier for # ourselves and just always restore the locale for all tests. - config.before(:each) do - @save_i18n_locale = I18n.locale - end - config.after(:each) do - I18n.locale = @save_i18n_locale + AlaveteliLocalization.set_locales(AlaveteliConfiguration::available_locales, + AlaveteliConfiguration::default_locale) end # Turn routing-filter off in functional and unit tests as per |