Replies: 1 comment
-
|
Hey @ytyubox! Thanks for reaching out! Yes, var sut: Subject?
aroundEach { example in
autoreleasepool {
sut = makeSut(...)
example()
}
expect(sut).to(beNil())
}Which should do what you want, but I didn't verify that code myself. You can also still use the XCTest-based methodology with it("deallocates correctly") {
let sut = makeSUT(...)
addTearDownBlock { [weak sut] in expect(sut).to(beNil()) }
return sut
}Hope that helps! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In XCTest, I can have addTeardownBlock do detect weak copy is nil or not
But I have no idea to to do that by Quick, I have done some search, and I found #1132 and its related discussion, but still have no clue.
Can this be done by
aroundEach?Beta Was this translation helpful? Give feedback.
All reactions