From 643023d98fabbcdb76a749ddf7b5d6a29589faab Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Thu, 7 Dec 2017 02:29:48 +0100 Subject: [PATCH] Add tests for shell integration --- test/shell.bats | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/shell.bats b/test/shell.bats index 9d6ae14b..bbb146e1 100644 --- a/test/shell.bats +++ b/test/shell.bats @@ -2,6 +2,17 @@ load test_helper +@test "shell integration disabled" { + run rbenv shell + assert_failure "rbenv: shell integration not enabled. Run \`rbenv init' for instructions." +} + +@test "shell integration enabled" { + eval "$(rbenv init -)" + run rbenv shell + assert_success "rbenv: no shell-specific version configured" +} + @test "no shell version" { mkdir -p "${RBENV_TEST_DIR}/myproject" cd "${RBENV_TEST_DIR}/myproject"