Last active
August 29, 2015 13:57
-
-
Save aprescott/9353408 to your computer and use it in GitHub Desktop.
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
# Collect _spec.rb and .feature files under spec/ that are relevant to current work, one per line. Good for pipes. | |
# | |
# 1. Modified, staged git files. | |
# 2. Modified, unstaged git files. | |
# 3. Changes in any commits since master. | |
# 4. New, untracked files. | |
# | |
# $ specs | xargs rspec | |
cat <(git diff --name-only) <(git diff --staged --name-only) <(git diff master..@ --name-only) <(git ls-files --others --exclude-standard) | uniq | grep -e "^spec/" | grep -E "_spec\.rb$|\.feature$" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment