Skip to content

Instantly share code, notes, and snippets.

@pimterry
Created December 3, 2016 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pimterry/70c4c0ae89ed0bbd0bf3c25ffd40a984 to your computer and use it in GitHub Desktop.
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
@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