diff options
author | Richard Maw <richard.maw@gmail.com> | 2017-01-02 17:05:24 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@gmail.com> | 2017-01-02 17:05:24 +0000 |
commit | 8ddd848fe17864e59b4c293974cb2c50e3639082 (patch) | |
tree | efdcf0c277431c0dd5063bfa13a2babae7049865 /TESTING | |
parent | 264b521198c65ad34a7c9534ebbcef39bd491dda (diff) | |
download | gitano-8ddd848fe17864e59b4c293974cb2c50e3639082.tar.gz |
Canonicalise permitting GIVEN with the SCENARIO
It looks nicer for short scenarios.
Diffstat (limited to 'TESTING')
-rw-r--r-- | TESTING | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -209,6 +209,20 @@ For the sake of readability, this codebase also has the following rules: that requires cleaning up, this often reads strangely and causes unnecessary padding. +7. In non-story scenarios + the `GIVEN` may be part of the `SCENARIO` and `ASSUMING` block. + + There's two rough classifications of scenarios: + + 1. Those that set up one thing (one `GIVEN` block) and test that, + somewhat like unit tests. + 2. Those that set things up multiple times (many `GIVEN` blocks) + and test each of those, structured as a story. + + In the non-story scenarios there will be only one `GIVEN` block, + so it may be more aesthetically pleasing to group it with the + `SCENARIO` and `ASSUMING`s which also only happen once, at the start. + Tip and tricks when writing tests for Gitano ============================================ |