Skip to content

Commit c364765

Browse files
committed
Make tests pass in an env where 'editor' symlink does exist
1 parent 5aa0ce5 commit c364765

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/test-open.bats

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,11 @@ notes="./notes"
2929
assert_output "Opening $HOME/notes"
3030
}
3131

32-
@test "Exits if EDITOR not configured" {
32+
@test "Exits if \$EDITOR isn't set and 'editor' doesn't exist" {
3333
unset EDITOR
34+
function type() { [ $1 != "editor" ]; } # Pretend editor doesn't exist.
35+
export -f type
36+
3437
run $notes open test
3538

3639
assert_failure

0 commit comments

Comments
 (0)