Created
December 28, 2011 18:43
-
-
Save sstephenson/1529115 to your computer and use it in GitHub Desktop.
Example bats test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bats | |
load test_helper | |
setup() { | |
load_fixture rehash | |
} | |
teardown() { | |
destroy_fixture | |
} | |
@test "rehash creates the shims directory if it does not exist" { | |
rm -fr "$RBENV_ROOT/shims" | |
rbenv rehash | |
[ -d "$RBENV_ROOT/shims" ] | |
} | |
@test "rehash merges all binaries from all installed versions" { | |
rbenv rehash | |
for shim in a b c; do | |
[ -x "$RBENV_ROOT/shims/$shim" ] | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment