LeoColman
04/16/2020, 10:22 PMSerVB
04/17/2020, 10:43 PMfun BehaviorSpec.givenTestContainerEShopAuth(test: suspend GivenContext.(TestApplicationEngine) -> Unit) {
given("test container e-shop-auth") {
withTestApplication(Application::testContainerEShopAuth) {
this@given.test(this)
}
}
}
If I rewrite it like a factory, then I have to call it like
include(givenTestContainerEShopAuth { app ->
// ...
})
I think it's not too clean. Maybe something like
include.givenTestContainerEShopAuth { app ->
// ...
}
is better 😀LeoColman
04/17/2020, 10:59 PMLeoColman
04/17/2020, 10:59 PMSerVB
04/18/2020, 7:32 AMinclude.givenTestContainerEShopAuth { app ->
// ...
}
This should give not an object of *Spec
type but of *Context
type so it can be used inside a spec.
I think the syntax should be discussed, though