Skip to content

Instantly share code, notes, and snippets.

@waldofe
Created March 1, 2014 00:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save waldofe/9282553 to your computer and use it in GitHub Desktop.
Save waldofe/9282553 to your computer and use it in GitHub Desktop.
Rspec failing tests rerun script
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
}
@waldofe
Copy link
Author

waldofe commented Mar 1, 2014

Run specs
zrun spec/.

Re-run just failing specs
zrun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment