Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,11 @@ def with_available_locales(*locales)
ensure
I18n.config.available_locales = Rails.application.config.i18n.available_locales
I18n.unstub(:available_locales)

# I18n only stores translations for available locales, so a reload inside the
# block (with_published_translations does one) leaves the backend without
# every other served locale. Reloading here brings them all back.
I18n.reload!
end

# e.g. with_published_translations(hu: { backend: { greeting: "Szia" } })
Expand Down
Loading