mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-17 15:53:45 -05:00
tests galore
This commit is contained in:
29
test/shims.bats
Normal file
29
test/shims.bats
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
load test_helper
|
||||
|
||||
@test "no shims" {
|
||||
run rbenv-shims
|
||||
assert_success
|
||||
assert [ -z "$output" ]
|
||||
}
|
||||
|
||||
@test "shims" {
|
||||
mkdir -p "${RBENV_ROOT}/shims"
|
||||
touch "${RBENV_ROOT}/shims/ruby"
|
||||
touch "${RBENV_ROOT}/shims/irb"
|
||||
run rbenv-shims
|
||||
assert_success
|
||||
assert_line "${RBENV_ROOT}/shims/ruby"
|
||||
assert_line "${RBENV_ROOT}/shims/irb"
|
||||
}
|
||||
|
||||
@test "shims --short" {
|
||||
mkdir -p "${RBENV_ROOT}/shims"
|
||||
touch "${RBENV_ROOT}/shims/ruby"
|
||||
touch "${RBENV_ROOT}/shims/irb"
|
||||
run rbenv-shims --short
|
||||
assert_success
|
||||
assert_line "irb"
|
||||
assert_line "ruby"
|
||||
}
|
||||
Reference in New Issue
Block a user