From 9bcef4b8759b54edee5413500f24f60be28499b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Mon, 13 Oct 2014 04:02:46 +0200 Subject: [PATCH] Add tests for non-directory types under `RBENV_ROOT/versions/` --- test/versions.bats | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/versions.bats b/test/versions.bats index 56a2aa33..5d79ed5a 100644 --- a/test/versions.bats +++ b/test/versions.bats @@ -119,3 +119,23 @@ OUT 2.0.0 OUT } + +@test "ignores non-directories under versions" { + create_version "1.9" + touch "${RBENV_ROOT}/versions/hello" + + run rbenv-versions --bare + assert_success "1.9" +} + +@test "lists symlinks under versions" { + create_version "1.8.7" + ln -s "1.8.7" "${RBENV_ROOT}/versions/1.8" + + run rbenv-versions --bare + assert_success + assert_output <