Refactor rename -> rename(to:)

This commit is contained in:
Max Howell
2019-01-31 10:15:34 -05:00
parent 889d825b3a
commit 49ef073e34
3 changed files with 14 additions and 7 deletions

View File

@@ -194,13 +194,13 @@ class PathTests: XCTestCase {
try Path.mktemp { root in
do {
let file = try root.bar.touch()
let foo = try file.rename("foo")
let foo = try file.rename(to: "foo")
XCTAssertFalse(file.exists)
XCTAssertTrue(foo.isFile)
}
do {
let file = try root.bar.touch()
XCTAssertThrowsError(try file.rename("foo"))
XCTAssertThrowsError(try file.rename(to: "foo"))
}
}
}