Skip to content

Commit

Permalink
Make a new subfolder when testing enumerating hidden files
Browse files Browse the repository at this point in the history
Reduces the risk of flakiness due to other contents in the global temp folder
  • Loading branch information
JohnSundell committed Jan 29, 2017
1 parent 5ce07ab commit 7f5fcdc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Tests/FilesTests/FilesTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,11 @@ class FilesTests: XCTestCase {

func testEnumeratingFilesIncludingHidden() {
performTest {
try folder.createFile(named: ".hidden")
try folder.createFile(named: "visible")
let subfolder = try folder.createSubfolder(named: "folder")
try subfolder.createFile(named: ".hidden")
try subfolder.createFile(named: "visible")

let files = folder.makeFileSequence(includeHidden: true)
let files = subfolder.makeFileSequence(includeHidden: true)
XCTAssertEqual(files.names, [".hidden", "visible"])
XCTAssertEqual(files.count, 2)
}
Expand Down

0 comments on commit 7f5fcdc

Please sign in to comment.