Closed MarkRx closed 6 years ago
Thanks for reporting the bug. I can reproduce it and work on a fix.
Currently the methods of EnvironmentVariables
are not designed to be used outside of an @Before
or the test itself. If you put the environmentVariables.set("B", "B")
into an @Before
method then everything works fine.
Nevertheless I consider the current behaviour as a bug and will fix it.
This is fixed in System Rules 1.18.0: 063b1c82864c11b9dd3e14846665f796f340b7d5
Environment variables should be reset after each class. Otherwise setup from one class leaks into another class which causes inconsistent behavior.
Example:
A.java:
B.java: