Alex Kuznetsov
11/13/2024, 8:26 PMKotlinLogging
? The following captures nothing
class OutputTest: StringSpec() {
private val logger = KotlinLogging.logger {}
init {
"capture" {
captureStandardOut {
logger.error("oops")
} shouldBe "oops\n"
}
"logger" {
captureStandardErr {
logger.error("oops")
} shouldBe "oops\n"
}
}
}
io.kotest.assertions.AssertionFailedError: expected:<"oops
"> but was:<<empty string>>
Klitos Kyriacou
11/14/2024, 10:23 AM