Last Updated: February 25, 2016
·
573
· alxndr

run all tests, excluding a particular directory

If your heavy/slow tests are in a particular directory, you can use find to have rspec run everything except the tests in that directory. Here my tests are all in ./spec/, and I want to skip the ones in ./spec/requests/:

find ./spec/ -type d -not -name requests -depth 1 -exec rspec {} +