Closed kostiakoval closed 10 years ago
I want to check that object is or not nil. expect does not support optional values.
let object:Int? it("shold work") { expect(object).toNot(beNil())
let object:Int? it("shold work") { expect(object).to(equal(object))
I was trying to implement that matcher but did't manage to do that. :(
I plan to add it soon. beNil matcher along with some other useful matchers are on our nearest roadmap, you can check TODO section in README
beNil
I've just pushed the implementation. Now you can write:
let object: Int? it("should work") { expect(object).to(beNil()) } let value: Int? = 3 it("should work") { expect(value).toNot(beNil()) }
See the corresponding BeNilSpec for example
I want to check that object is or not nil. expect does not support optional values.
I was trying to implement that matcher but did't manage to do that. :(