ruby - Rspec run all tests except a specific folder -
the project i'm working on has large test suite. writing test passes when run alone when run entire test suite $rspec
funky behavior causes test fail.
right test nested this:
spec/folder1/folder2/folder3/test.rb
each of these commands run test fine , passes:
$rspec spec/folder1/folder2/folder3 $rspec spec/folder1/folder2 $rspec spec/folder1/
there 10 other folders @ same level folder1
individually not run rest of suite in order determine folder contains tests breaking test working on.
is possible?
use --exclude-pattern
, they're quite convenient:
https://www.relishapp.com/rspec/rspec-core/v/3-3/docs/configuration/exclude-pattern
one of nice things them:
the
--exclude-pattern
flag accepts shell style glob unions
so rspec --exclude-pattern "spec/{foldername1,foldername2}/**/*_spec.rb"
Comments
Post a Comment