Kaynağa Gözat

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
pull/360/head^2
Mislav Marohnić 10 yıl önce
ebeveyn
işleme
c69d9a1128
1 değiştirilmiş dosya ile 4 ekleme ve 1 silme
  1. +4
    -1
      test/which.bats

+ 4
- 1
test/which.bats Dosyayı Görüntüle

@ -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"
}

Yükleniyor…
İptal
Kaydet