Created
June 9, 2017 11:35
-
-
Save odlp/9e55c57d8f9321c738732b40987a4aa0 to your computer and use it in GitHub Desktop.
No focus specs
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
#!/bin/sh | |
set -eu | |
failIfPresentInSpecs() { | |
REGEX=$1 | |
if find spec -type f -name "*_spec.rb" -exec grep -E "$REGEX" {} +; then | |
printf "\nFound focused specs\n" | |
exit 1 | |
fi | |
} | |
failIfPresentInSpecs "(:focus\s=>|focus:)\strue" | |
failIfPresentInSpecs "(fit|fdescribe|fcontext)\s?(\(|\"|')" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment