mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-18 04:39:14 +00:00
Run tests with specified locale
We changed .env.test a while ago, but I just discovered it hadn't taken any effect because it was overwritten here. Now it's loaded from env var.
This commit is contained in:
@@ -150,7 +150,8 @@ RSpec.configure do |config|
|
||||
|
||||
# Reset locale for all specs.
|
||||
config.around(:each) do |example|
|
||||
I18n.with_locale(:en_AU) { example.run }
|
||||
locale = ENV.fetch('LOCALE', 'en_TST')
|
||||
I18n.with_locale(locale) { example.run }
|
||||
end
|
||||
|
||||
# Reset all feature toggles to prevent leaking.
|
||||
|
||||
Reference in New Issue
Block a user