Created
March 20, 2015 17:30
-
-
Save yuriteixeira/6bd501a1d787564d6a80 to your computer and use it in GitHub Desktop.
TDD Made Easy - Run tests when the files change
This file contains hidden or 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
# TDD | |
function tdd { | |
pathToTestRunner=$1 | |
filesToWatch=$2 | |
if [[ -z $pathToTestRunner ]] | |
then | |
pathToTestRunner="vendor/bin/phpunit" | |
fi | |
if [[ -z $filesToWatch ]] | |
then | |
filesToWatch="./src:./lib:./tests" | |
fi | |
clear; $pathToTestRunner | |
fswatch $filesToWatch \ | |
"O=$pathToTestRunner; \ | |
clear; \ | |
echo \"$O\"" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment