1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-16 15:23:53 -05:00

Merge branch 'which-fixes'

This commit is contained in:
Mislav Marohnić
2015-11-14 10:42:41 +00:00
3 changed files with 13 additions and 1 deletions

View File

@@ -20,6 +20,12 @@ create_executable() {
assert_failure "rbenv: version \`2.0' is not installed (set by RBENV_VERSION environment variable)"
}
@test "fails with invalid version set from file" {
echo 1.9 > .ruby-version
run rbenv-exec rspec
assert_failure "rbenv: version \`1.9' is not installed (set by $PWD/.ruby-version)"
}
@test "completes with names of executables" {
export RBENV_VERSION="2.0"
create_executable "ruby" "#!/bin/sh"

View File

@@ -68,6 +68,12 @@ create_executable() {
assert_failure "rbenv: rake: command not found"
}
@test "no executable found for system version" {
export PATH="$(path_without "rake")"
RBENV_VERSION=system run rbenv-which rake
assert_failure "rbenv: rake: command not found"
}
@test "executable found in other versions" {
create_executable "1.8" "ruby"
create_executable "1.9" "rspec"