summaryrefslogtreecommitdiff
path: root/jt.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'jt.yaml')
-rw-r--r--jt.yaml55
1 files changed, 46 insertions, 9 deletions
diff --git a/jt.yaml b/jt.yaml
index f33cd94..22a5c90 100644
--- a/jt.yaml
+++ b/jt.yaml
@@ -1,10 +1,47 @@
-- given: a file (?P<filename>.+)
-- when: I run (?P<cmd>jt .*)
-- then: there is (?P<count>\d+) draft
-- then: there is (?P<count>\d+) draft, with attachment (?P<filename>.+)
-- then: there is (?P<count>\d+) journal entry
-- then: there is (?P<count>\d+) journal entry, with attachment (?P<filename>.+)
-- then: there is (?P<count>\d+) journal entry, belonging to (?P<id>.+)
-- then: there is (?P<count>\d+) topic, (?P<id>.+), titled "(?P<title>.+)"
+- given: a file (?P<filename>\S+)
+ function: create_empty_file
+
+- given: an empty journal
+ function: create_empty_journal
+
+- then: draft (?P<id>\d+) has title "(?P<title>.+)"
+ function: draft_has_title
+
+- then: it fails
+ function: jt_failed
+
+- then: there are (?P<count>\d+) drafts
+ function: n_drafts
+
- then: there are (?P<count>\d+) journal entries
-- then: draft (?P<id>\d+) has title "(?P<title>.*)"
+ function: n_entries
+
+- then: there are no drafts
+ function: no_drafts
+
+- then: there are no journal entries
+ function: no_entries
+
+- then: there is 1 draft
+ function: one_draft
+
+- then: there is 1 draft, with attachment (?P<filename>\S+)
+ function: one_draft_with_attachment
+
+- then: there is 1 journal entry
+ function: one_entry
+
+- then: there is 1 journal entry, belonging to (?P<topic>\S+)
+ function: one_entry_on_topic
+
+- then: there is 1 journal entry, with attachment (?P<filename>\S+)
+ function: one_enry_with_attachment
+
+- then: there there is 1 topic, (?P<topic>\S+), titled "(?P<title>.+)"
+ function: one_topic
+
+- when: I run (?P<command>jt .*)
+ function: run_jt
+
+- when: I try to run (?P<command>jt .*)
+ function: try_jt