 import Files
 
 class FilesTests: XCTestCase {
-    let folder = FileSystem().temporaryFolder
+    private var folder: Folder!
+
+    // MARK: - XCTestCase
+
+    override func setUp() {
+        super.setUp()
+        folder = try! Folder.home.createSubfolder(named: ".filesTest")
+    }
+
+    override func tearDown() {
+        try? folder.delete()
+        super.tearDown()
+    }
     
     // MARK: - Tests
     

        performTest {
            let fileManager = FileManagerMock()
            let fileSystem = FileSystem(using: fileManager)
            let subfolder = try fileSystem.temporaryFolder.createSubfolder(named: "folder")
            let file = try subfolder.createFile(named: "file")
            try XCTAssertEqual(file.read(), Data())
        

    
    func testReadingFileWithTildePath() {
        performTest {
            try folder.createFile(named: "File")
            let file = try File(path: "~/.filesTest/File")
            try XCTAssertEqual(file.read(), Data())
            XCTAssertEqual(file.path, folder.path + "File")

            // Cleanup since we're performing a test in the actual home folder
            try file.delete()
