Hi there!
Is there any way to set the current/default locale when run
gradle check
? I have some logic that rely on `Locale`/`NSLocale` and the unit tests are using the machine locale which may be out of control..
✅ 1
j
jw
05/27/2022, 1:12 PM
Both have mutators you can use to set the global default. Just be sure to capture the default, change default, and then try/finally to reset it back to the real value.
m
Marek Niedbach
05/27/2022, 1:15 PM
yeah, I know I can try to handle it directly in tests (setup/teardown), but I wondered if there is some kind of global mechanism to set the language globally (i.e. as gradle task argument or something)