Loving the way Minutest lets you seamlessly extend...
# minutest
n
Loving the way Minutest lets you seamlessly extend it’s DSL syntax. For example:
Copy code
fun <F, G> TestContext<F>.focusingOn(
    property: KProperty1<F,G>, 
    builder: Context<F, G>.() -> Unit
) =
    derivedContext(property.name, property, builder)
Used like…
Copy code
data class Fixture(val fruit: String)

    override val tests = context<Fixture> {
        fixture { Fixture("banana") }

        focusingOn(Fixture::fruit) {
            test("whoops have a banana!") {
                assertEquals("banana", this)
            }
        }
    }