2014-11-17 15:44:50 +01:00
|
|
|
#!/usr/bin/env bats
|
|
|
|
|
|
|
|
load test_helper
|
|
|
|
|
2015-07-18 08:49:57 +02:00
|
|
|
@test "not enough arguments for ruby-build" {
|
2023-10-17 00:18:14 +02:00
|
|
|
mkdir -p "$TMP"
|
2014-11-17 15:44:50 +01:00
|
|
|
# use empty inline definition so nothing gets built anyway
|
2023-10-17 00:18:14 +02:00
|
|
|
touch "${TMP}/empty-definition"
|
|
|
|
run ruby-build "${TMP}/empty-definition"
|
2014-11-17 15:44:50 +01:00
|
|
|
assert_failure
|
2014-11-27 05:03:01 +01:00
|
|
|
assert_output_contains 'Usage: ruby-build'
|
2014-11-17 15:44:50 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@test "extra arguments for ruby-build" {
|
2023-10-17 00:18:14 +02:00
|
|
|
mkdir -p "$TMP"
|
2014-11-17 15:44:50 +01:00
|
|
|
# use empty inline definition so nothing gets built anyway
|
2023-10-17 00:18:14 +02:00
|
|
|
touch "${TMP}/empty-definition"
|
|
|
|
run ruby-build "${TMP}/empty-definition" "${TMP}/install" ""
|
2014-11-17 15:44:50 +01:00
|
|
|
assert_failure
|
2014-11-27 05:03:01 +01:00
|
|
|
assert_output_contains 'Usage: ruby-build'
|
2014-11-17 15:44:50 +01:00
|
|
|
}
|