-
-
Save passalini/9388731 to your computer and use it in GitHub Desktop.
zrun, to run specs and save the ones tha fail
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
function zrun() { | |
SPEC_FILE=$1 | |
SPEC_LOG=/tmp/rspec.log | |
if [ $SPEC_FILE ]; then | |
rspec $SPEC_FILE 2>&1 | tee $SPEC_LOG | |
else | |
cat $SPEC_LOG | grep "^rspec" | cut -d ' ' -f 2 | xargs rspec 2>&1 | tee $SPEC_LOG | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment