Created
December 3, 2016 18:14
-
-
Save pimterry/70c4c0ae89ed0bbd0bf3c25ffd40a984 to your computer and use it in GitHub Desktop.
A simple real bats test, using `run` to assert on status and output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@test "Should show matching notes only if a pattern is provided to find" { | |
touch $NOTES_DIRECTORY/match-note1.md | |
touch $NOTES_DIRECTORY/hide-note2.md | |
run $notes find "match" | |
assert_success | |
assert_line "match-note1.md" | |
refute_line "hide-note2.md" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment