After a long discussion with Dan and other JBehave dev list members, I am reconvinced of the merits of the word “should”.
Dan’s argument went something like this:
- In an agile environment, everything is mutable. Nothing is certain.
- A test which boldly declares that something will have a certain behaviour is hard to delete. It feels as though actual functionality is being removed.
- A test which suggests that something should have a certain behaviour is open to question. Should it? If the test fails, is it because there’s a bug in the functionality, or because the required behaviour is different? Perhaps the responsibility of the class has changed. Perhaps the behaviour is no longer required at all.
- It’s easier to delete or modify “should” than it is to delete or modify “will”.
- “Should” makes you question. “Will” makes you certain. Certainty is only good when combined with accuracy, otherwise it’s false assumption.
- In an agile environment, it’s impossible to always be accurate about customer requirements (and therefore behaviour).
I think even Sam is showing signs of being convinced this time.