kylef / Spectre

BDD Framework and test runner for Swift projects and playgrounds
BSD 2-Clause "Simplified" License
404 stars 41 forks source link

More expectations #31

Closed ilyapuchka closed 6 years ago

ilyapuchka commented 6 years ago
kylef commented 6 years ago

Adding a not expectation type was on my list of things to implement for some time. I was thinking of adding a not "keyword" on an expectation so you could chain not to various types. I've made a start in #33. What do you think?

ilyapuchka commented 6 years ago

@kylef that's nice! Though I find it a bit confusing that things like try expect("kyle").to.to.not.to.to.to.beNil() are possible. Maybe we can use a phantom type or a separate expectation type to allow only specific methods after to or not? Maybe also not.to or just notTo would be better than to.not?