From d317af572c596eb032efc816e7c0eef87055b632 Mon Sep 17 00:00:00 2001 From: Pierre Mesure Date: Fri, 24 May 2019 22:24:10 +0200 Subject: [PATCH] Set locales in test environment to avoid failed specs --- config/environments/test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/config/environments/test.rb b/config/environments/test.rb index 77cd9ed14..304339a8a 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,6 +1,18 @@ Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. + # Some tests require the following languages (en, es, fr, nl, pt-BR) + # so we override the available languages for the test environment. + config.i18n.default_locale = :en + available_locales = [ + "en", + "es", + "fr", + "nl", + "pt-BR" + ] + config.i18n.available_locales = available_locales + # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped