The source of the problem is that `win32-dir` monkey patches the `Dir.getwd` method to invoked native Win32 APIs to get the current directory. But the code under test is just using `File.expand_path`. As a result, if you `cd <path>` using a different case than the underlying directory, `File.expand_path` will return one case, `Dir.getwd` will return a different one.