#!/usr/bin/env bats load test_helper setup() { export RBENV_ROOT="${TMP}/rbenv" export HOOK_PATH="${TMP}/i has hooks" mkdir -p "$HOOK_PATH" } @test "rbenv-install hooks" { cat > "${HOOK_PATH}/install.bash" < "$definition" <<<"echo ruby-build" run rbenv-install "$definition" assert_success assert_output <<-OUT before: ${RBENV_ROOT}/versions/2.0.0 ruby-build after: 0 rehashed OUT } @test "rbenv-uninstall hooks" { cat > "${HOOK_PATH}/uninstall.bash" <