kitttn
05/25/2017, 6:05 PMjackmiras
05/25/2017, 6:52 PMkitttn
05/25/2017, 6:54 PMkitttn
05/25/2017, 7:07 PMjackmiras
05/25/2017, 7:08 PMjackmiras
05/25/2017, 7:09 PMjasper
05/25/2017, 9:55 PMrook
05/30/2017, 5:51 PMon
even after our discussion. I decided to just c/p the example(http://spekframework.org/docs/latest/#_basic_structure), and the tests still do not pass.rook
05/30/2017, 5:52 PMwith one `on` statement▾
user
05/30/2017, 5:52 PMhttps://kotlinlang.slack.com/files/U4MLMD6UA/F5K9UTYTS/screen_shot_2017-05-30_at_10.49.40.png▾
bulwinkel
05/31/2017, 8:52 AMdarych
05/31/2017, 11:05 AMkadir
05/31/2017, 11:57 AMrook
05/31/2017, 12:58 PMahdezma
06/05/2017, 9:49 AMsubject-extension
, which is really useful, good work!
I’m trying to create a simple specification which tests, lets say, a box, in two different ways (a one-element box, and a multi-element box) but I’m having problems since it seems that subjects
inside different given
aren’t supported.
This is my code:
const val TEST = "test"
const val ELEMENT_1 = "element_1"
const val ELEMENT_2 = "element_2"
const val ELEMENT_3 = "element_3"
const val ELEMENT_4 = "element_4"
/**
* @author Alejandro Hernández
*/
object BoxSpekTest : SubjectSpek<Box<String>>({
given("a one-element box") {
subject {
Box(TEST)
}
on("retrieving head") {
it("should return \"$TEST\"") {
subject.head() shouldBe TEST
}
}
}
given("a multi-element box") {
subject {
Box(ELEMENT_1, ELEMENT_2, ELEMENT_3, ELEMENT_4)
}
on("retrieving head") {
it("should return \"$ELEMENT_1\"") {
subject.head() shouldBe ELEMENT_1
}
}
}
})
First it
(“should return \“$TEST\“) fails because it uses the second declared subject
Is this expected behaviour?raniejade
06/05/2017, 10:04 AMSubjectSpek
usually declared on the top-most scope.ahdezma
06/05/2017, 10:07 AMSubjectSpek
per case. Isn’t it?raniejade
06/05/2017, 10:08 AMahdezma
06/05/2017, 10:10 AMdeviant
06/05/2017, 8:27 PMlukeschmidt
06/08/2017, 6:08 PMjunit4.SpringRunner
.
How would I set up my maven pom.xml
file to use both the Spek test runner and the existing SpringRunner in the same test process?
Sorry I’m a bit new to all of this, so thank you all for your patience and help!wst
06/09/2017, 2:31 AMwst
06/09/2017, 2:32 AMraniejade
06/09/2017, 2:52 AMwst
06/09/2017, 3:24 AMverachadw
06/12/2017, 12:57 PMnstewart
06/12/2017, 12:58 PMaalmiray
06/12/2017, 9:33 PMoleksandr.samsonov
06/16/2017, 11:12 PMredrield
06/18/2017, 1:36 PMgradle test