Is it possible to configure individual test cases in a BehaviorSpec
in kotlintest?
For StringSpec
tests it is possible to do like so:
class MyTest : StringSpec({
"this is a test".config(...) {}
})
I can't seem to do the same for a BehaviorSpec
. I'd expect something like:
class MyTest : BehaviorSpec({
Given("a foo") {
When("baring") {
Then("bazzing") {
}.config(...)
}
}
})
According to this supposedly solved issue, this is already implemented. But as far as I can see (using version 3.1.8 of kotlintest) Then
returns Unit
...
This is fixed in release 3.2
Now you can do something like.