Commit 34246f9f authored by Mislav Marohnić's avatar Mislav Marohnić
Browse files

Have rbenv-uninstall respect `-h|--help`

parent 96d9cbe7
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -27,6 +27,10 @@ if [ -z "$RBENV_ROOT" ]; then
  RBENV_ROOT="${HOME}/.rbenv"
fi

if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
  usage 0
fi

unset FORCE
if [ "$1" = "-f" ] || [ "$1" = "--force" ]; then
  FORCE=true
+13 −0
Original line number Diff line number Diff line
@@ -161,6 +161,13 @@ OUT
  assert_output_contains 'Usage: rbenv install'
}

@test "show help for rbenv-install" {
  stub_ruby_build
  run rbenv-install -h
  assert_success
  assert_output_contains 'Usage: rbenv install'
}

@test "not enough arguments rbenv-uninstall" {
  run rbenv-uninstall
  assert_failure
@@ -172,3 +179,9 @@ OUT
  assert_failure
  assert_output_contains 'Usage: rbenv uninstall'
}

@test "show help for rbenv-uninstall" {
  run rbenv-uninstall -h
  assert_success
  assert_output_contains 'Usage: rbenv uninstall'
}