3

Trying to exclude the specs in the /home dir during the parallel run.

Tried a few things similar to the following:

parallel_rspec myproj -n 4 -o '--exclude-pattern "myproj/spec/home/*_spec.rb"'

parallel_rspec ./myproj -n 4 -o '--exclude-pattern "./myproj/spec/home/*_spec.rb"'

But it does not exclude specs in the /home dir. It runs all specs in myproj.

The following commands do exclude specs in /home dir but I need to run them in parallel:

rspec myproj --exclude-pattern "myproj/spec/home/*_spec.rb"

rspec ./myproj --exclude-pattern "./myproj/spec/home/*_spec.rb"

danksim
  • 617
  • 3
  • 9
  • 27

2 Answers2

1

I always used the rake task for that as advised here:

ParallelRSpec::RakeTask.new(:prspec) do |t|
  ENV['WORKERS'] = '4'
  t.rspec_opts = '--exclude-pattern "myproj/spec/home/*_spec.rb"'
end

and run it as:

bundle exec rake prspec
Aleksei Matiushkin
  • 119,336
  • 10
  • 100
  • 160
0

I ended up using the parallel_test gem.

I added the following to the .rspec_parallel file:

--tag ~tagname1
--tag ~tagname2
--tag ~tagname3

This excluded the specs tagged with tagname1,2,3.

danksim
  • 617
  • 3
  • 9
  • 27