Created
June 7, 2016 00:14
-
-
Save corajr/10e21f707e9544b24dada8b50cf8fcb0 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
# usage: copy me to .git/hooks/pre-commit | |
# chmod +x .git/hooks/pre-commit | |
# Stash unstaged changes and untracked files before running tests | |
git stash -q --keep-index -u | |
# Run non-feature tests | |
rspec --format progress --tag ~type:feature | |
FAILED="$?" | |
# Unstash | |
git stash pop -q | |
exit $FAILED |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment