From 30447917d785345dd99ee8cfe601b94ff413260c Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 18 Apr 2020 14:06:23 +0300 Subject: Add: acceptance criteria for simple patterns This adds scenarios for regex patterns capture and simple pattern capture from scenario steps, and additionally makes use of simple patterns everywhere possible in the examples. --- muck.yaml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'muck.yaml') diff --git a/muck.yaml b/muck.yaml index b7bba50..21fe303 100644 --- a/muck.yaml +++ b/muck.yaml @@ -1,38 +1,47 @@ - given: "a fresh Muck server" function: fixme -- given: "I am (?P\\S+)" +- given: "I am {name}" function: fixme -- given: "I am (?P\\S+), with super capability" +- given: "I am {name}, with super capability" function: fixme - when: "I do POST /res with (?P\\{.*\\})" function: fixme + regex: true - when: "I do PUT /res with Muck-Id: \\{(?P\\S+)\\}, Muck-Revision: \\{(?P\\S+)\\}, and body (?P\\{.*\\})" function: fixme + regex: true - when: "I do GET /res with Muck-Id: \\{(?P\\S+)\\}" function: fixme + regex: true - when: "I do DELETE /res with Muck-Id: \\{(?P\\S+)\\}" function: fixme + regex: true - when: "I restart Muck" function: fixme + regex: true - then: "response code is (?P\\d+)" function: fixme + regex: true -- then: "header (?P
\\S+) is (?P\\S+)" +- then: "header {header} is {name}" function: fixme - then: "header (?P
\\S+) matches \\{(?P\\S+)\\}" function: fixme + regex: true - then: "body matches (?P\\{.*\\})" function: fixme + regex: true - then: "revisions \\{(?P\\S+)\\} and \\{(?P\\S+)\\} are different" function: fixme + regex: true -- cgit v1.2.1