summaryrefslogtreecommitdiff
path: root/TESTING
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2017-01-02 17:05:24 +0000
committerRichard Maw <richard.maw@gmail.com>2017-01-02 17:05:24 +0000
commit8ddd848fe17864e59b4c293974cb2c50e3639082 (patch)
treeefdcf0c277431c0dd5063bfa13a2babae7049865 /TESTING
parent264b521198c65ad34a7c9534ebbcef39bd491dda (diff)
downloadgitano-8ddd848fe17864e59b4c293974cb2c50e3639082.tar.gz
Canonicalise permitting GIVEN with the SCENARIO
It looks nicer for short scenarios.
Diffstat (limited to 'TESTING')
-rw-r--r--TESTING14
1 files changed, 14 insertions, 0 deletions
diff --git a/TESTING b/TESTING
index 8c754c7..6253086 100644
--- a/TESTING
+++ b/TESTING
@@ -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
============================================