createRandomFile

fun createRandomFile(prefix: String = "", suffix: String = ""): PreparedProvider<Path>(source)

Creates a random file, which is automatically deleted at the end of the test.

Example

val logs by createRandomFile()

test("A test") {
logs().writeText("…")
}