robfletcher
07/20/2018, 5:22 PMGiven
not a synonym for beforeGroup
/ beforeEachTest
? It seems like that would make sense. For example it’s where I’d want to initialize mocks.raniejade
07/22/2018, 5:33 AMgiven-on-it
to the gherkin style.: https://spekframework.org/migration/#given-on-it (still needs improvement). The two are somewhat similar but not symmetrical.raniejade
07/22/2018, 5:39 AMScenario
, if you use memoized
it caches by scope so Given/When/Then
will see the same instance.raniejade
07/22/2018, 5:41 AMScenario
as a test method in JUnit.robfletcher
07/22/2018, 4:21 PMrobfletcher
07/23/2018, 4:59 PMset
in the docs) is there a way to generate a memoized value in the When
portion for testing the return value for something? It’s not clear what the appropriate structure is then unless I just use a Then
which feels like I’m throwing the grammar out the window and is awkward if there are many Then
blocks.robfletcher
07/23/2018, 5:34 PMval response by memoized {
service.getSomeData()
}
but if service
relies on any mock/stub collaborators set up with beforeGroup
that won’t work.raniejade
07/24/2018, 12:35 AMlateinit var response: Foo
on Scenario
. Other than that I can't think of any alternatives yet.