@adamedx I see what @mcquin (Hi Claire, one of the Sanders' here ;) did in fix (#1398), but I don't think it applies to these tests as I need to test if the actual ENV object is updated correctly by the different calls. If I stub that in a fake env variable, the tests are not testing the actual thing they should in order to determine is stuff works correctly :)

So for this particular test, you want to alter the global state to confirm the workings of the patch. At the same time in reality this doesn't actually change anything outside this rspec test run and the added ENV key is dedicated for this test which is set to only run on Windows machines. So I think that should all be good...

Will have a look at using double() instead of the custom class I created for this test to make stuff more generic and clean.