move tests to be more behavior driven

This commit is contained in:
Jonathan Wren 2020-09-19 11:43:18 -07:00
parent 80bc2ae4ae
commit d1692ab771
No known key found for this signature in database
GPG key ID: 43D5FF8722E7F68A
3 changed files with 33 additions and 34 deletions

View file

@ -91,3 +91,29 @@ Feature: Searching in a journal
Given we use the config "dayone.yaml"
When we run "jrnl @plAy"
Then the output should contain "2013-05-17 11:39 This entry has tags!"
Scenario: Loading a sample journal
Given we use the config "basic.yaml"
When we run "jrnl -2"
Then we should get no error
And the output should be
"""
2013-06-09 15:39 My first entry.
| Everything is alright
2013-06-10 15:40 Life is good.
| But I'm better.
"""
Scenario: Loading a DayOne Journal
Given we use the config "dayone.yaml"
When we run "jrnl -from 'feb 2013'"
Then we should get no error
And the output should be
"""
2013-05-17 11:39 This entry has tags!
2013-06-17 20:38 This entry has a location.
2013-07-17 11:38 This entry is starred!
"""