Fix tests for #1203

This commit is contained in:
Jeffrey 'jf' Lim 2020-01-08 16:41:14 +08:00
parent 5c3268c9af
commit 40db754168
3 changed files with 7 additions and 7 deletions

View file

@ -7,10 +7,10 @@ setup() {
cd "$RBENV_TEST_DIR"
}
@test "reports global file even if it doesn't exist" {
@test "does not report global file if it doesn't exist" {
assert [ ! -e "${RBENV_ROOT}/version" ]
run rbenv-version-origin
assert_success "${RBENV_ROOT}/version"
assert_success ""
}
@test "detects global file" {
@ -52,5 +52,5 @@ SH
@test "doesn't inherit RBENV_VERSION_ORIGIN from environment" {
RBENV_VERSION_ORIGIN=ignored run rbenv-version-origin
assert_success "${RBENV_ROOT}/version"
assert_success ""
}

View file

@ -14,7 +14,7 @@ setup() {
@test "no version selected" {
assert [ ! -d "${RBENV_ROOT}/versions" ]
run rbenv-version
assert_success "system (set by ${RBENV_ROOT}/version)"
assert_success "system"
}
@test "set by RBENV_VERSION" {

View file

@ -21,7 +21,7 @@ stub_system_ruby() {
stub_system_ruby
assert [ ! -d "${RBENV_ROOT}/versions" ]
run rbenv-versions
assert_success "* system (set by ${RBENV_ROOT}/version)"
assert_success "* system"
}
@test "not even system ruby available" {
@ -42,7 +42,7 @@ stub_system_ruby() {
run rbenv-versions
assert_success
assert_output <<OUT
* system (set by ${RBENV_ROOT}/version)
* system
1.9
OUT
}
@ -61,7 +61,7 @@ OUT
run rbenv-versions
assert_success
assert_output <<OUT
* system (set by ${RBENV_ROOT}/version)
* system
1.8.7
1.9.3
2.0.0