Fix test suite running on OpenBSD

The error was "bash: no such file or directory" and it was due to bash
being located in `/usr/local/bin` on OpenBSD 5.4 instead of `/bin` like
on other systems.

Fixed by keeping `/usr/local/bin` in PATH during the test run.
This commit is contained in:
Mislav Marohnić 2014-01-02 22:17:38 +01:00
parent 6d0bf9b39f
commit 3dc0005032
2 changed files with 3 additions and 3 deletions

View file

@ -51,14 +51,14 @@ load test_helper
}
@test "adds shims to PATH" {
export PATH="${BATS_TEST_DIRNAME}/../libexec:/usr/bin:/bin"
export PATH="${BATS_TEST_DIRNAME}/../libexec:/usr/bin:/bin:/usr/local/bin"
run rbenv-init - bash
assert_success
assert_line 0 'export PATH="'${RBENV_ROOT}'/shims:${PATH}"'
}
@test "adds shims to PATH (fish)" {
export PATH="${BATS_TEST_DIRNAME}/../libexec:/usr/bin:/bin"
export PATH="${BATS_TEST_DIRNAME}/../libexec:/usr/bin:/bin:/usr/local/bin"
run rbenv-init - fish
assert_success
assert_line 0 "setenv PATH '${RBENV_ROOT}/shims' \$PATH"

View file

@ -8,7 +8,7 @@ if [ "$RBENV_ROOT" != "${RBENV_TEST_DIR}/root" ]; then
export RBENV_ROOT="${RBENV_TEST_DIR}/root"
export HOME="${RBENV_TEST_DIR}/home"
PATH=/usr/bin:/bin:/usr/sbin:/sbin
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
PATH="${RBENV_TEST_DIR}/bin:$PATH"
PATH="${BATS_TEST_DIRNAME}/../libexec:$PATH"
PATH="${BATS_TEST_DIRNAME}/libexec:$PATH"