summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-07-26 09:49:46 +0300
committerLars Wirzenius <liw@liw.fi>2020-07-26 09:49:46 +0300
commit15b9b937786220a2169146c21a501b54039f53a3 (patch)
treebf8cf5d4f186dd9421b8733002101f012cc52e31
parent522dfaaf2d6cfc2977f0ec39cb787e4932d9c49a (diff)
downloadewww-15b9b937786220a2169146c21a501b54039f53a3.tar.gz
refactor: "when I create" to "given file"
-rw-r--r--ewww.md4
-rw-r--r--ewww.yaml8
2 files changed, 6 insertions, 6 deletions
diff --git a/ewww.md b/ewww.md
index 1536483..6ccafe1 100644
--- a/ewww.md
+++ b/ewww.md
@@ -89,8 +89,8 @@ for static content only. Every other method returns an error.
~~~scenario
given a self-signed certificate as snakeoil.pem, using key snakeoil.key
-when I create webroot/foo.html with "this is your web page"
-given a running server using config file smoke.yaml
+and file webroot/foo.html with "this is your web page"
+and a running server using config file smoke.yaml
when I request GET https://example.com/foo.html
then I get status code 200
and header content-type is "text/html"
diff --git a/ewww.yaml b/ewww.yaml
index 08a13e4..375558d 100644
--- a/ewww.yaml
+++ b/ewww.yaml
@@ -8,6 +8,10 @@
- given: "{count} files in {dirname}"
function: fixme
+- given: file (?P<filename>\S+) with "(?P<content>.*)"
+ regex: true
+ function: create_file
+
- then: I am redirected to {location}
function: fixme
@@ -25,10 +29,6 @@
regex: true
function: http_body_is
-- when: I create (?P<filename>\S+) with "(?P<content>.*)"
- regex: true
- function: create_file
-
- when: I request {method} {url}
function: request