You should ASSERT that the file exists here, before you remove it. Otherwise the test could pass if the file was never created and remove was broken. Unlikely, I'll admit, but still a possibility.