rbenv-ruby-build/test/arguments.bats
Mislav Marohnić a559b30fd8
Improve cached_tarball test helper
- Now only generates a `configure` script if explicitly specified
- Add ability to add arbitrary files to the tarball
- Cache most common tarballs in fixtures directory to speed up tests
2023-10-17 12:40:17 +02:00

21 lines
587 B
Bash

#!/usr/bin/env bats
load test_helper
@test "not enough arguments for ruby-build" {
mkdir -p "$TMP"
# use empty inline definition so nothing gets built anyway
touch "${TMP}/empty-definition"
run ruby-build "${TMP}/empty-definition"
assert_failure
assert_output_contains 'Usage: ruby-build'
}
@test "extra arguments for ruby-build" {
mkdir -p "$TMP"
# use empty inline definition so nothing gets built anyway
touch "${TMP}/empty-definition"
run ruby-build "${TMP}/empty-definition" "${TMP}/install" ""
assert_failure
assert_output_contains 'Usage: ruby-build'
}