kotest-core / io.kotest.core.spec.style / ShouldSpecDsl

ShouldSpecDsl

interface ShouldSpecDsl : SpecDsl

Example:

"some test" { "with context" { should("do something") { // test here } } }

or

should("do something") { // test here }

Types

Testbuilder

class Testbuilder

Functions

context

Adds a top level context scope to the spec.

open fun context(name: String, init: suspend ContextScope.() -> Unit): Unit

invoke

open operator fun String.invoke(init: suspend ShouldScope.() -> Unit): Unit

should

open fun should(name: String, test: suspend TestContext.() -> Unit): Unit
open fun should(name: String): Testbuilder

Inheritors

ShouldSpec

abstract class ShouldSpec : DslDrivenSpec, ShouldSpecDsl

ShouldSpecTestFactoryConfiguration

class ShouldSpecTestFactoryConfiguration : TestFactoryConfiguration, ShouldSpecDsl