Skip to content

Commit

Permalink
Make tests pass in an env where 'editor' symlink does exist
Browse files Browse the repository at this point in the history
  • Loading branch information
pimterry committed Dec 2, 2016
1 parent 5aa0ce5 commit c364765
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/test-open.bats
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ notes="./notes"
assert_output "Opening $HOME/notes"
}

@test "Exits if EDITOR not configured" {
@test "Exits if \$EDITOR isn't set and 'editor' doesn't exist" {
unset EDITOR
function type() { [ $1 != "editor" ]; } # Pretend editor doesn't exist.
export -f type

run $notes open test

assert_failure
Expand Down

0 comments on commit c364765

Please sign in to comment.