https://kotlinlang.org logo
#spek
Title
# spek
s

snowe

01/29/2019, 4:28 PM
or even compose better functionality instead of inherit.. It seems hard with the way that it's all run in a block.
r

robstoll

01/29/2019, 4:36 PM
in spek 1.x there was include which let you compose tests
I think it did not make it into 2.x so far (I would use it was well)
s

snowe

01/29/2019, 4:55 PM
I can't even find any documentation on that. searching
spek include
doesn't work very well as you can imagine.
t

tapchicoma

01/29/2019, 9:18 PM
mm, but you can compose tests using extension on
Suite
(if I am getting you right):
Copy code
fun Suite.mySuite() {
    context("zzz") {
        beforeEach {  }
        it("zzz") { }
    }
}
s

snowe

01/29/2019, 9:30 PM
Yes, but I can’t put that in a separate class. It has to go along with the rest of the beforeEach, afterEach, etc.
t

tapchicoma

01/29/2019, 9:34 PM
what is preventing putting it in a separate class?
you can pass main suite memoized values as a param 🤔
s

snowe

01/29/2019, 9:48 PM
hm. could you provide an example? How would the
beforeEachTest
be executed?