mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-11-24 04:41:02 +01:00
Move rbenv-install/uninstall tests to rbenv.bats
This commit is contained in:
parent
3ae43a44e2
commit
96d9cbe77c
2 changed files with 26 additions and 30 deletions
|
|
@ -21,33 +21,3 @@ load test_helper
|
||||||
assert_failure
|
assert_failure
|
||||||
assert_output_contains 'Usage: ruby-build'
|
assert_output_contains 'Usage: ruby-build'
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "extra arguments for rbenv-install" {
|
|
||||||
stub ruby-build "--lib : $BATS_TEST_DIRNAME/../bin/ruby-build --lib"
|
|
||||||
stub rbenv-hooks
|
|
||||||
stub rbenv-rehash
|
|
||||||
|
|
||||||
run rbenv-install 2.1.1 2.1.2
|
|
||||||
assert_failure
|
|
||||||
assert_output_contains 'Usage: rbenv install'
|
|
||||||
|
|
||||||
unstub ruby-build
|
|
||||||
unstub rbenv-hooks
|
|
||||||
unstub rbenv-rehash
|
|
||||||
}
|
|
||||||
|
|
||||||
@test "not enough arguments rbenv-uninstall" {
|
|
||||||
run rbenv-uninstall
|
|
||||||
assert_failure
|
|
||||||
assert_output_contains 'Usage: rbenv uninstall'
|
|
||||||
}
|
|
||||||
|
|
||||||
@test "extra arguments for rbenv-uninstall" {
|
|
||||||
stub rbenv-hooks
|
|
||||||
|
|
||||||
run rbenv-uninstall 2.1.1 2.1.2
|
|
||||||
assert_failure
|
|
||||||
assert_output_contains 'Usage: rbenv uninstall'
|
|
||||||
|
|
||||||
unstub rbenv-hooks
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -146,3 +146,29 @@ ${RBENV_ROOT}/plugins/bar/share/ruby-build
|
||||||
${RBENV_ROOT}/plugins/foo/share/ruby-build
|
${RBENV_ROOT}/plugins/foo/share/ruby-build
|
||||||
OUT
|
OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "not enough arguments for rbenv-install" {
|
||||||
|
stub_ruby_build
|
||||||
|
run rbenv-install
|
||||||
|
assert_failure
|
||||||
|
assert_output_contains 'Usage: rbenv install'
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "too many arguments for rbenv-install" {
|
||||||
|
stub_ruby_build
|
||||||
|
run rbenv-install 2.1.1 2.1.2
|
||||||
|
assert_failure
|
||||||
|
assert_output_contains 'Usage: rbenv install'
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "not enough arguments rbenv-uninstall" {
|
||||||
|
run rbenv-uninstall
|
||||||
|
assert_failure
|
||||||
|
assert_output_contains 'Usage: rbenv uninstall'
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "too many arguments for rbenv-uninstall" {
|
||||||
|
run rbenv-uninstall 2.1.1 2.1.2
|
||||||
|
assert_failure
|
||||||
|
assert_output_contains 'Usage: rbenv uninstall'
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue