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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -