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
  • Select an option

  • Save passalini/9388731 to your computer and use it in GitHub Desktop.

Select an option

Save passalini/9388731 to your computer and use it in GitHub Desktop.

Revisions

  1. passalini revised this gist Apr 9, 2014. No changes.
  2. @waldofe waldofe created this gist Mar 1, 2014.
    10 changes: 10 additions & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    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
    }