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

WordSpecDsl

interface WordSpecDsl : SpecDsl

Defines the DSL for creating tests in the 'WordSpec' style.

Example:

"some test" should { "do something" { // test here } }

Types

FinalTestContext

class FinalTestContext : TestContext

WhenContext

class WhenContext

WordScope

class WordScope

Functions

should

open infix fun String.should(init: suspend WordScope.() -> Unit): Unit

When

open infix fun String.When(init: suspend WhenContext.() -> Unit): Unit

when

open infix fun String.when(init: suspend WhenContext.() -> Unit): Unit

Inheritors

WordSpec

abstract class WordSpec : DslDrivenSpec, WordSpecDsl

WordSpecTestFactoryConfiguration

Decorates a TestFactoryConfiguration with the WordSpec DSL.

class WordSpecTestFactoryConfiguration : TestFactoryConfiguration, WordSpecDsl