2
1
mirror of https://github.com/kdabir/has.git synced 2024-09-18 17:01:29 +02:00
has/.hastest.bats

20 lines
432 B
Plaintext
Raw Normal View History

2017-08-28 18:07:44 +02:00
#!/usr/bin/env bats
@test "works with single command check" {
result=$(bash has git)
2017-08-28 18:07:44 +02:00
[[ $result == *"✔ git"* ]]
2017-08-28 18:07:44 +02:00
}
@test "safely tells about tools not configured" {
result=$(bash has something-missing)
[[ $result == *"✘ something-missing not understood"* ]]
}
@test "env lets override safety check" {
result=$(HAS_ALLOW_UNSAFE=y bash has something-missing)
[[ $result == *"✘ something-missing"* ]]
}