Skip to content

Commit

Permalink
Fix build failures caused by i18n
Browse files Browse the repository at this point in the history
I18n.available_locales needs to be cleared before storing translations: ruby-i18n/i18n#391
  • Loading branch information
mshibuya committed Feb 10, 2018
1 parent fcb7bab commit 374ce35
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions spec/spec_helper.rb
Expand Up @@ -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
Expand Down

0 comments on commit 374ce35

Please sign in to comment.