stefanbirkner / system-rules

A collection of JUnit rules for testing code which uses java.lang.System.
http://stefanbirkner.github.io/system-rules
Other
546 stars 71 forks source link

environment variables do not set #81

Open toli-belo opened 4 years ago

toli-belo commented 4 years ago

Using jUnit I can setup the @Rule and set a variable but it does not reflect in the System.getenv("..."), it returns the old value.

sporadek commented 4 years ago

I'm seeing a similar issue with env vars on version 1.18.0 and later. 1.17.2 and earlier work fine. Which releases have you tried?

stefanbirkner commented 4 years ago

@toli-belo Can you please provide a minimal example/test that shows the problem.

ashleyfrieze commented 3 years ago

Jupiter support available in https://github.com/webcompere/system-stubs/tree/master/system-stubs-jupiter - a fork of system-lambda