Skip to content

Commit

Permalink
Add tests for non-directory types under RBENV_ROOT/versions/
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Oct 13, 2014
1 parent f237a11 commit 9bcef4b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/versions.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<OUT
1.8
1.8.7
OUT
}

0 comments on commit 9bcef4b

Please sign in to comment.