diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 0d6a6a39e..cc32da588 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -74,6 +74,9 @@ module I18nHelpers def change_locale_and_store_translations(locale, translations, &block) current_locale = I18n.locale begin + # I18n.available_locales needs to be cleared before storing translations: + # https://github.com/svenfuchs/i18n/pull/391 + I18n.available_locales = nil I18n.backend.store_translations locale, translations I18n.locale = locale yield