Skip to content

Commit 5c3fcb4

Browse files
Fix ambiguous use of expect issue
1 parent ccb11fc commit 5c3fcb4

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Tests/PathKitTests/PathKitSpec.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -290,12 +290,12 @@ describe("PathKit") {
290290
let current = Path.current
291291
let error = ThrowError()
292292

293-
try expect {
293+
try expect({
294294
try Path("/usr/bin").chdir {
295295
try expect(Path.current) == Path("/usr/bin")
296296
throw error
297297
}
298-
}.toThrow(error)
298+
}).toThrow(error)
299299

300300
try expect(Path.current) == current
301301
}
@@ -324,9 +324,9 @@ describe("PathKit") {
324324
$0.it("errors when you read from a non-existing file as NSData") {
325325
let path = Path("/tmp/pathkit-testing")
326326

327-
try expect {
327+
try expect({
328328
try path.read() as Data
329-
}.toThrow()
329+
}).toThrow()
330330
}
331331

332332
$0.it("can read a String from a file") {
@@ -339,9 +339,9 @@ describe("PathKit") {
339339
$0.it("errors when you read from a non-existing file as a String") {
340340
let path = Path("/tmp/pathkit-testing")
341341

342-
try expect {
342+
try expect({
343343
try path.read() as String
344-
}.toThrow()
344+
}).toThrow()
345345
}
346346
}
347347

@@ -364,9 +364,9 @@ describe("PathKit") {
364364
let path = Path("/")
365365
let data = "Hi".data(using: String.Encoding.utf8, allowLossyConversion: true)
366366

367-
try expect {
367+
try expect({
368368
try path.write(data!)
369-
}.toThrow()
369+
}).toThrow()
370370
#endif
371371
}
372372

@@ -384,9 +384,9 @@ describe("PathKit") {
384384
#else
385385
let path = Path("/")
386386

387-
try expect {
387+
try expect({
388388
try path.write("hi")
389-
}.toThrow()
389+
}).toThrow()
390390
#endif
391391
}
392392
}

0 commit comments

Comments
 (0)