>From README.md: In ScalaTest, the body of the ...
# kotlintest
h
From README.md: In ScalaTest, the body of the class is the constructor, so you write tests directly in the class body. The KotlinTest equivalent is the init block.
Hmm, I redefined
StringSpec
to receive the body of the test class as constructor. Seems to be fine and useful, if there is no need to declare methods in the test class.
Copy code
import io.kotlintest.specs.StringSpec as _StringSpec

abstract class StringSpec(body: StringSpec.() -> Unit) : _StringSpec() {
    init { body(this) }
}