mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-07 20:31:01 -05:00
Isolate rbenv-which tests from any .ruby-version
file on the system
Having a `.ruby-version` file in any of the parent directories of the local clone of rbenv could cause the test suite to fail because it wasn't expecting a local version to be set. Fixes #533
This commit is contained in:
parent
f4652fbbf0
commit
c69d9a1128
1 changed files with 4 additions and 1 deletions
|
@ -93,7 +93,7 @@ echo HELLO="\$(printf ":%s" "\${hellos[@]}")"
|
|||
exit
|
||||
SH
|
||||
|
||||
RBENV_HOOK_PATH="$hook_path" IFS=$' \t\n' run rbenv-which anything
|
||||
RBENV_HOOK_PATH="$hook_path" IFS=$' \t\n' RBENV_VERSION=system run rbenv-which anything
|
||||
assert_success
|
||||
assert_output "HELLO=:hello:ugly:world:again"
|
||||
}
|
||||
|
@ -103,6 +103,9 @@ SH
|
|||
cat > "${RBENV_ROOT}/version" <<<"1.8"
|
||||
create_executable "1.8" "ruby"
|
||||
|
||||
mkdir -p "$RBENV_TEST_DIR"
|
||||
cd "$RBENV_TEST_DIR"
|
||||
|
||||
RBENV_VERSION= run rbenv-which ruby
|
||||
assert_success "${RBENV_ROOT}/versions/1.8/bin/ruby"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue