summaryrefslogtreecommitdiff
path: root/muck.yaml
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2019-06-01 20:51:39 +0300
committerLars Wirzenius <liw@liw.fi>2019-06-01 20:51:39 +0300
commita5ca02964ca988807d8b796a7994feeabe6d6ef9 (patch)
treea2c1c6f83e6bd27120495e63514fa142f361c1ee /muck.yaml
parent003f4d7e3cb68b96e505ae45cb64bf5c3d728632 (diff)
downloadfable-poc-a5ca02964ca988807d8b796a7994feeabe6d6ef9.tar.gz
Change: handle steps starting with AND correctly
Also change bindings file so that the keyword (GIVEN, WHEN, THEN, etc) is a dict key, not part of the pattern.
Diffstat (limited to 'muck.yaml')
-rw-r--r--muck.yaml52
1 files changed, 20 insertions, 32 deletions
diff --git a/muck.yaml b/muck.yaml
index afc7249..0e1f189 100644
--- a/muck.yaml
+++ b/muck.yaml
@@ -1,32 +1,20 @@
-- pattern: when I fetch resource (?P<id>\S+)
-- pattern: and I fetch resource (?P<id>\S+)
-
-- pattern: then it has revision (?P<revision>\S+)
-- pattern: and it has revision (?P<revision>\S+)
-
-- pattern: then it is mine
-- pattern: and it is mine
-
-- pattern: then remember the resource id as (?P<name>\S+)
-- pattern: and remember the resource id as (?P<name>\S+)
-
-- pattern: then remember the resource revision as (?P<name>\S+)
-- pattern: and remember the resource revision as (?P<name>\S+)
-
-- pattern: given I am (?P<username>\S+)
-- pattern: given a running Muck
-- pattern: then I only get resource (?P<id>\S+)
-- pattern: then I get (?P<json>.+)
-- pattern: "then it doesn't exist"
-- pattern: then it works
-- pattern: then there are no resources in Muck
-
-- pattern: then there is (?P<number>\d+) resource in Muck
-- pattern: then there are (?P<number>\d+) resources in Muck
-
-- pattern: then there are no matches
-- pattern: when I create a resource (?P<json>.+)
-- pattern: when I delete (?P<id>\S+)
-- pattern: when I search for (?P<field>\S+) being (?P<value>.+)
-- pattern: when I update (?P<id>\S+), revision (?P<rev>\S+), with (?P<json>.+)
-- pattern: when Muck is restarted
+- given: I am (?P<username>\S+)
+- given: a running Muck
+- then: "it doesn't exist"
+- then: I get (?P<json>.+)
+- then: I only get resource (?P<id>\S+)
+- then: it has revision (?P<revision>\S+)
+- then: it is mine
+- then: it works
+- then: remember the resource id as (?P<name>\S+)
+- then: remember the resource revision as (?P<name>\S+)
+- then: there are (?P<number>\d+) resources in Muck
+- then: there are no matches
+- then: there are no resources in Muck
+- then: there is (?P<number>\d+) resource in Muck
+- when: I create a resource (?P<json>.+)
+- when: I delete (?P<id>\S+)
+- when: I fetch resource (?P<id>\S+)
+- when: I search for (?P<field>\S+) being (?P<value>.+)
+- when: I update (?P<id>\S+), revision (?P<rev>\S+), with (?P<json>.+)
+- when: Muck is restarted