summaryrefslogtreecommitdiff
path: root/yarns
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2014-04-18 14:47:23 +0100
committerLars Wirzenius <liw@liw.fi>2014-04-18 14:47:23 +0100
commita9ffa29261bb2b228f7a925e14bb63bd478d7ec8 (patch)
treea7b68d12e8d0ab2946597035fc0e214034044a1c /yarns
parent48148e9e97a5cb9b2b425e48dfeb0b4793a9f8f5 (diff)
downloaddistix-a9ffa29261bb2b228f7a925e14bb63bd478d7ec8.tar.gz
Implement distix init
Diffstat (limited to 'yarns')
-rw-r--r--yarns/030-init.yarn12
-rw-r--r--yarns/900-implements.yarn9
2 files changed, 21 insertions, 0 deletions
diff --git a/yarns/030-init.yarn b/yarns/030-init.yarn
new file mode 100644
index 0000000..bf4cc88
--- /dev/null
+++ b/yarns/030-init.yarn
@@ -0,0 +1,12 @@
+Initialising a repository
+=========================
+
+This chapter contains scenarios for testing the initialisation and
+creation of a repository.
+
+ SCENARIO create a repository
+ WHEN user attempts to run distix init REPO
+ THEN attempt succeeded
+ AND REPO exists
+ AND REPO/.git exists
+ AND REPO/repo.yaml exists
diff --git a/yarns/900-implements.yarn b/yarns/900-implements.yarn
index 14ad7ff..cc4c003 100644
--- a/yarns/900-implements.yarn
+++ b/yarns/900-implements.yarn
@@ -67,3 +67,12 @@ content.
IMPLEMENTS GIVEN file (\S+) containing "(.*)"
printf "$MATCH_2" > "$DATADIR/$MATCH_1"
+
+
+File tests
+-----------
+
+Does a file or directory exist?
+
+ IMPLEMENTS THEN (\S+) exists
+ test -e "$DATADIR/$MATCH_1"