The project I'm working on has a fairly large test suite. I am currently writing test that passes when I run it alone but when I run the entire test suite $rspec
I get some really funky behavior that causes the test to fail.
Right now the test is nested like this:
spec/folder1/folder2/folder3/test.rb
Each of these commands run the test fine and everything passes:
$rspec spec/folder1/folder2/folder3 $rspec spec/folder1/folder2 $rspec spec/folder1/
There are about 10 other folders at the same level as folder1
that I would like to individually not run with the rest of the suite in order to determine which folder contains tests that are breaking the test I am working on.
Is this possible?
Use an --exclude-pattern
, they're quite convenient:
https://www.relishapp.com/rspec/rspec-core/v/3-3/docs/configuration/exclude-pattern
One of the nice things about them:
The
--exclude-pattern
flag accepts shell style glob unions
So you could do something like rspec --exclude-pattern "spec/{foldername1,foldername2}/**/*_spec.rb"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With