Skip to content

Instantly share code, notes, and snippets.

@jwliechty
Created August 18, 2012 17:20
Show Gist options
  • Save jwliechty/3388524 to your computer and use it in GitHub Desktop.
Save jwliechty/3388524 to your computer and use it in GitHub Desktop.
Find rspec tests missing requires
#!/bin/bash
runSpec(){
local specTest="$1"
bundle exec rspec "${specTest}" > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo -n "."
else
echo -n "F"
echo "${specTest}" >> failed_individual_spec_tests.txt
fi
}
export -f runSpec
rm -f failed_individual_spec_tests.txt
find spec -name "*_spec.rb" -exec bash -c 'runSpec {}' \;
echo -e "\nfailed tests:"
cat failed_individual_spec_tests.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment