Add test for version-origin when version not found in rbenv-exec

This commit is contained in:
Mislav Marohnić 2015-11-13 22:53:27 -05:00
parent d740406daf
commit 09b18cf6f5

View file

@ -20,6 +20,12 @@ create_executable() {
assert_failure "rbenv: version \`2.0' is not installed (set by RBENV_VERSION environment variable)" 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" { @test "completes with names of executables" {
export RBENV_VERSION="2.0" export RBENV_VERSION="2.0"
create_executable "ruby" "#!/bin/sh" create_executable "ruby" "#!/bin/sh"