Skip to content

Instantly share code, notes, and snippets.

@itsthejb
Created April 7, 2014 14:15
Show Gist options
  • Save itsthejb/10021125 to your computer and use it in GitHub Desktop.
Save itsthejb/10021125 to your computer and use it in GitHub Desktop.
Pre-commit hook Grep for focussed Specta tests
#!/bin/bash
GREP_OUTPUT=`grep -R 'fdescribe(\|fcontext(\|fexample(\|fspecify(' Tests`
if [ ! -z "$GREP_OUTPUT" ]; then
echo "Remove focussed specs before commiting."
echo $GREP_OUTPUT
exit 1
fi
@itsthejb
Copy link
Author

NB: Rename .git/hooks/pre-commit

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