move tests to be more behavior driven

This commit is contained in:
Jonathan Wren 2020-09-19 11:40:24 -07:00
parent e3f3904cf7
commit 80bc2ae4ae
No known key found for this signature in database
GPG key ID: 43D5FF8722E7F68A
12 changed files with 228 additions and 236 deletions

View file

@ -119,3 +119,27 @@ Feature: Tagging
| (2) ???
| (3) PROFIT!
"""
Scenario: Loading tags from a DayOne Journal
Given we use the config "dayone.yaml"
When we run "jrnl --tags"
Then the output should be
"""
@work : 1
@play : 1
"""
Scenario: Saving tags from a DayOne Journal
Given we use the config "dayone.yaml"
When we run "jrnl A hard day at @work"
And we run "jrnl --tags"
Then the output should be
"""
@work : 2
@play : 1
"""
Scenario: Filtering by tags from a DayOne Journal
Given we use the config "dayone.yaml"
When we run "jrnl @work"
Then the output should be "2013-05-17 11:39 This entry has tags!"