Having used Cucumber for several months, I've been bitten by "should not" several times. It's very easy to misspell something, and the "should not" test will pass even though it shouldn't. I've even seen tests that test for "should not" even though the test should have been removed with the feature they were testing which was long gone. After all, you can write 'I should not see "practically anything"', and it'll almost always pass ;)
My experience is that it's much more robust to do something like:
Given ...By using "should see" and "should not see" side-by-side, your test becomes much more robust.
Then I should see "blah"
Given ...
And I reload
Then I should not see "blah"


0 comments:
Post a Comment