fun <T : Path> Expect<T>.toBeWritable(): Expect<T>
(source)
Expects that the subject of this
expectation (a Path) is writable;
meaning that there is a file system entry at the location the Path points to and
that the current thread has the permission to write to it.
This assertion resolves symbolic links. Therefore, if a symbolic link exists at the location the subject points to, search will continue at the location the link points at.
val dir = tempDir.newDirectory("test_dir")
expect(dir).toBeWritable()
fails {
expect(Paths.get("non_existing_dir")).toBeWritable()
}
Return
an Expect for the subject of this
expectation.
Since
0.17.0