Created
July 8, 2013 05:38
-
-
Save etorreborre/5946440 to your computer and use it in GitHub Desktop.
G/W/T
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| I'm not a fan of G/W/T because: | |
| - in its original form it forces you to use the words "given/when/then" and I prefer to have more freedom when I write specifications (even if the G/W/T pattern is actually followed) | |
| - the implementation makes it hard not to use variables, leading to difficulties in reusing steps and composing behaviors | |
| - I tend to think of a more simple functional, "input-output" way of seeing things when I write specifications |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks a lot for your answer !
Point 1. I use G/W/T as the equivalent of A/A/A, the pro is the comprehensive and coherent structure of my tests. I've noted the freedom allows by specs2.
Point 2. If I understand well your previous answer, If I want the same behaviour as Around, i have to duplicate preStep and postStep around all my scenarios. -> so yes, this duplication seems to break DRY principle.
Point 3. I'm not yet ready for pure functionnal programming and some output depends on input AND global state (e.g. Database setup)