Skip to content

Instantly share code, notes, and snippets.

@passalini
Forked from waldofe/gist:9282553
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save passalini/9388731 to your computer and use it in GitHub Desktop.
Save passalini/9388731 to your computer and use it in GitHub Desktop.
zrun, to run specs and save the ones tha fail
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