kirillrakhman
06/15/2016, 8:12 AMdescribe("two subjects") {
val foo = subject { mutableListOf("foo") }
val bar = subject { mutableListOf(foo()) }
context("add to foo") {
beforeEach {
foo().add("foo2")
}
it("bar's single item should have two items") {
assertEquals(2, bar().single().size)
}
}
context("add to bar") {
beforeEach {
bar().add(mutableListOf("baz"))
}
it("foo should have one items") {
assertEquals(1, foo().size)
}
it("bar should have two items") {
assertEquals(2, bar().size)
}
}
}