Merge pull request #1456 from richiethomas/master

`rbenv version`- test coverage for preferring local over global version file
This commit is contained in:
Mislav Marohnić 2022-10-17 13:47:27 +02:00 committed by GitHub
commit 52acbdf83f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,3 +36,12 @@ setup() {
run rbenv-version run rbenv-version
assert_success "1.9.3 (set by ${RBENV_ROOT}/version)" assert_success "1.9.3 (set by ${RBENV_ROOT}/version)"
} }
@test "prefer local over global file" {
create_version "1.9.3"
create_version "3.0.0"
cat > ".ruby-version" <<<"1.9.3"
cat > "${RBENV_ROOT}/version" <<<"3.0.0"
run rbenv-version
assert_success "1.9.3 (set by ${PWD}/.ruby-version)"
}