To increase tests, added possibility to set used locales via env vars.

This commit is contained in:
Martin Edenhofer 2015-11-19 09:06:12 +01:00
parent eb4ecc5aa7
commit ea6112a9bc

View file

@ -7,6 +7,11 @@ class Locale < ApplicationModel
if Rails.env.test?
locales = Locale.where(active: true, locale: ['en-us', 'de-de'])
end
# read used locales based on env, e. g. export Z_LOCALES='en-us:de-de'
if ENV['Z_LOCALES']
locales = Locale.where(active: true, locale: ENV['Z_LOCALES'].split(':') )
end
locales
end