Make all translation lookup errors throw exceptions in test mode
This commit is contained in:
parent
ac6a872a48
commit
4ee60c0f8f
3 changed files with 49 additions and 29 deletions
|
@ -42,6 +42,12 @@ I18n.fallbacks.map("no" => "nb")
|
|||
|
||||
I18n.enforce_available_locales = false
|
||||
|
||||
if Rails.env.test?
|
||||
I18n.exception_handler = proc do |exception|
|
||||
raise exception.to_exception
|
||||
end
|
||||
end
|
||||
|
||||
Rails.configuration.after_initialize do
|
||||
I18n.available_locales
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue