hastebrot
07/05/2016, 12:42 PMFrom 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.
import io.kotlintest.specs.StringSpec as _StringSpec
abstract class StringSpec(body: StringSpec.() -> Unit) : _StringSpec() {
init { body(this) }
}