mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
create local .ruby-version file in test dir
This new test was creating an (intentionally invalid) .ruby-version file in current working directory; typically the rbenv project dir. Immediately after test runs, I had a leftover .ruby-version file. The version-file tests create and cd into the RBENV_TEST_DIR as part of setup(). I'm using the same directory for this test fix, but am only using it for this particular test. None of the other exec tests seem to need to be in a temp test dir, so no use putting it in setup().
This commit is contained in:
parent
63671a1479
commit
a3ff3adc39
1 changed files with 2 additions and 0 deletions
|
@ -21,6 +21,8 @@ create_executable() {
|
|||
}
|
||||
|
||||
@test "fails with invalid version set from file" {
|
||||
mkdir -p "$RBENV_TEST_DIR"
|
||||
cd "$RBENV_TEST_DIR"
|
||||
echo 1.9 > .ruby-version
|
||||
run rbenv-exec rspec
|
||||
assert_failure "rbenv: version \`1.9' is not installed (set by $PWD/.ruby-version)"
|
||||
|
|
Loading…
Reference in a new issue