From a5ca02964ca988807d8b796a7994feeabe6d6ef9 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 1 Jun 2019 20:51:39 +0300 Subject: 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. --- muck.yaml | 52 ++++++++++++++++++++-------------------------------- 1 file changed, 20 insertions(+), 32 deletions(-) (limited to 'muck.yaml') 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\S+) -- pattern: and I fetch resource (?P\S+) - -- pattern: then it has revision (?P\S+) -- pattern: and it has revision (?P\S+) - -- pattern: then it is mine -- pattern: and it is mine - -- pattern: then remember the resource id as (?P\S+) -- pattern: and remember the resource id as (?P\S+) - -- pattern: then remember the resource revision as (?P\S+) -- pattern: and remember the resource revision as (?P\S+) - -- pattern: given I am (?P\S+) -- pattern: given a running Muck -- pattern: then I only get resource (?P\S+) -- pattern: then I get (?P.+) -- pattern: "then it doesn't exist" -- pattern: then it works -- pattern: then there are no resources in Muck - -- pattern: then there is (?P\d+) resource in Muck -- pattern: then there are (?P\d+) resources in Muck - -- pattern: then there are no matches -- pattern: when I create a resource (?P.+) -- pattern: when I delete (?P\S+) -- pattern: when I search for (?P\S+) being (?P.+) -- pattern: when I update (?P\S+), revision (?P\S+), with (?P.+) -- pattern: when Muck is restarted +- given: I am (?P\S+) +- given: a running Muck +- then: "it doesn't exist" +- then: I get (?P.+) +- then: I only get resource (?P\S+) +- then: it has revision (?P\S+) +- then: it is mine +- then: it works +- then: remember the resource id as (?P\S+) +- then: remember the resource revision as (?P\S+) +- then: there are (?P\d+) resources in Muck +- then: there are no matches +- then: there are no resources in Muck +- then: there is (?P\d+) resource in Muck +- when: I create a resource (?P.+) +- when: I delete (?P\S+) +- when: I fetch resource (?P\S+) +- when: I search for (?P\S+) being (?P.+) +- when: I update (?P\S+), revision (?P\S+), with (?P.+) +- when: Muck is restarted -- cgit v1.2.1