I have a suite of tests for a controller that makes calls to an external sandbox api for testing, which makes the performance rather slow. I'd like to improve performance by allowing parallel_tests to not only run suites in parallel, but individual describe
s.
For example:
RSpec.describe FooController do
describe '#index' ...
describe '#create' ...
end
Because the #index
and #create
tests do not share any memory space, it's fine to parallelize them. One option is:
RSpec.describe 'FooController#index' do
describe '#index' ...
end
RSpec.describe 'FooController#index' do
describe '#create' ...
end
but this makes the tests look awkward and a pain to read through. Is there a way I can easily have parallel_tests
run each describe
in parallel?