Created
June 15, 2016 00:56
-
-
Save corajr/ac05fcab19dc7e95b83094244a3a93d7 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