Revert quoting change in previous commit; adjust test to match code

Revert back to original quoting style used before previous commit.
Adjust init.bats to reflect changes for successful tests.
This commit is contained in:
Jeff Kowalski 2017-05-16 13:36:06 -07:00
parent be2e606fbd
commit a81da8d864
2 changed files with 3 additions and 3 deletions

View file

@ -86,7 +86,7 @@ mkdir -p "${RBENV_ROOT}/"{shims,versions}
case "$shell" in case "$shell" in
fish ) fish )
echo 'set -gx PATH '${RBENV_ROOT}'/shims $PATH' echo "set -gx PATH '${RBENV_ROOT}/shims' \$PATH"
echo "set -gx RBENV_SHELL $shell" echo "set -gx RBENV_SHELL $shell"
;; ;;
* ) * )

4
test/init.bats Normal file → Executable file
View file

@ -73,7 +73,7 @@ OUT
export PATH="${BATS_TEST_DIRNAME}/../libexec:/usr/bin:/bin:/usr/local/bin" export PATH="${BATS_TEST_DIRNAME}/../libexec:/usr/bin:/bin:/usr/local/bin"
run rbenv-init - fish run rbenv-init - fish
assert_success assert_success
assert_line 0 "setenv PATH '${RBENV_ROOT}/shims' \$PATH" assert_line 0 "set -gx PATH '${RBENV_ROOT}/shims' \$PATH"
} }
@test "can add shims to PATH more than once" { @test "can add shims to PATH more than once" {
@ -87,7 +87,7 @@ OUT
export PATH="${RBENV_ROOT}/shims:$PATH" export PATH="${RBENV_ROOT}/shims:$PATH"
run rbenv-init - fish run rbenv-init - fish
assert_success assert_success
assert_line 0 "setenv PATH '${RBENV_ROOT}/shims' \$PATH" assert_line 0 "set -gx PATH '${RBENV_ROOT}/shims' \$PATH"
} }
@test "outputs sh-compatible syntax" { @test "outputs sh-compatible syntax" {