pyenv/test
Mislav Marohnić db143bb654 rbenv exec: avoid mutating PATH
Enables shelling out from a ruby process started with rbenv to a ruby
process with a different RBENV_VERSION. Fixes #121

This removes the workaround created for #15 and solves `ruby -S` support
by setting RUBYPATH. PATH is never changed.

To illustrate how RUBYPATH changes in various configurations:

    PATH=~/bin:~/.rbenv/shims:/usr/bin:/bin
    RBENV_VERSION=1.8 ruby -S rake
    #=> executes ~/.rbenv/versions/1.8/bin/rake
    #=> RUBYPATH=~/bin:~/.rbenv/versions/1.8/bin:/usr/bin:/bin

    RBENV_VERSION=2.0 ruby -S rake
    #=> executes ~/.rbenv/versions/2.0/bin/rake
    #=> RUBYPATH=~/bin:~/.rbenv/versions/2.0/bin:/usr/bin:/bin

    RBENV_VERSION=system ruby -S rake
    #=> executes /usr/bin/rake
    #=> RUBYPATH=~/bin:/rbenv_shims_were_here:/usr/bin:/bin

    RBENV_VERSION=1.8 ruby -S rake
    #=> executes ~/.rbenv/versions/1.8/bin/rake
    #=> RUBYPATH=~/bin:~/.rbenv/versions/1.8/bin:/usr/bin:/bin
2013-06-20 20:41:22 +02:00
..
libexec tests galore 2013-03-07 15:07:32 -05:00
--version.bats work around bug in git 1.8.2.1 in tests 2013-06-07 19:13:54 +02:00
commands.bats fix iterating through paths that have spaces in them 2013-04-01 01:04:19 +02:00
completions.bats undo assert_output_lines in tests 2013-04-08 23:16:35 +02:00
exec.bats rbenv exec: avoid mutating PATH 2013-06-20 20:41:22 +02:00
global.bats tests galore 2013-03-07 15:07:32 -05:00
help.bats add tests for help and rbenv --version 2013-04-08 23:16:35 +02:00
hooks.bats undo assert_output_lines in tests 2013-04-08 23:16:35 +02:00
init.bats tests for rbenv-init 2013-03-20 13:43:57 +01:00
local.bats add tests for version commands 2013-04-08 23:16:35 +02:00
prefix.bats tests galore 2013-03-07 15:07:32 -05:00
rbenv.bats tests galore 2013-03-07 15:07:32 -05:00
rehash.bats test that IFS in hooks is correct 2013-04-16 14:01:43 +02:00
shell.bats undo assert_output_lines in tests 2013-04-08 23:16:35 +02:00
shims.bats tests galore 2013-03-07 15:07:32 -05:00
test_helper.bash ensure cleaner PATH in test environment 2013-06-20 20:41:22 +02:00
version-file-read.bats add tests for version commands 2013-04-08 23:16:35 +02:00
version-file-write.bats add tests for version commands 2013-04-08 23:16:35 +02:00
version-file.bats add tests for version commands 2013-04-08 23:16:35 +02:00
version-name.bats add tests for version commands 2013-04-08 23:16:35 +02:00
version-origin.bats add tests for version commands 2013-04-08 23:16:35 +02:00
version.bats add tests for version commands 2013-04-08 23:16:35 +02:00
versions.bats improve versions tests by cd'ing into a clean slate 2013-04-16 12:52:42 +02:00
whence.bats undo assert_output_lines in tests 2013-04-08 23:16:35 +02:00
which.bats test that IFS in hooks is correct 2013-04-16 14:01:43 +02:00