Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Minutest Fixtures with Descriptors
class Fixture {
val tempFile: File
}
fixture { testDescriptor ->
Fixture(System.createTempFile(testDescriptor.fullName.joinToString("/"), ".json"))
}
test {
doSomethingThatWritesTo(tempFile)
assertContentsOf(tempFile)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment