ソースを参照

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().
pull/487/head^2
Jason Karns 8年前
コミット
a3ff3adc39
1個のファイルの変更2行の追加0行の削除
  1. +2
    -0
      test/exec.bats

+ 2
- 0
test/exec.bats ファイルの表示

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

読み込み中…
キャンセル
保存