I want to execute my rspec tests in parallel
If I need all tests to perform on 6 cores I use bundle exec rake parallel:spec[6]
How can I specify a tag option for spec rake, e.g. --tag ~chat
To run a single Rspec test file, you can do: rspec spec/models/your_spec. rb to run the tests in the your_spec. rb file.
Run RSpec Tests in Parallel This is “Parallel Testing”. Parallel Testing gives you the same benefits as running a multi-threaded application and helps you reduce the run time of your test suite, resulting in faster build times and faster releases.
Use SPEC_OPTS environment variable for passing options to rspec in this case.
Example:
$ SPEC_OPTS='--tag ~chat' bundle exec rake parallel:spec[6]
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