Created
March 1, 2014 00:04
-
-
Save waldofe/9282553 to your computer and use it in GitHub Desktop.
Rspec failing tests rerun script
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
Run specs
zrun spec/.
Re-run just failing specs
zrun