Commit 0ba51628 authored by Albert Salim's avatar Albert Salim

Fix parallel_rspec_runner not to run all tests

parent ca34a87a
...@@ -43,6 +43,16 @@ RSpec.describe Tooling::ParallelRSpecRunner do # rubocop:disable RSpec/FilePath ...@@ -43,6 +43,16 @@ RSpec.describe Tooling::ParallelRSpecRunner do # rubocop:disable RSpec/FilePath
subject.run subject.run
end end
context 'when there is no intersect between allocated tests and filtered tests' do
let(:filter_tests) { '99_spec.rb' }
it 'does not run rspec' do
expect(subject).not_to receive(:exec)
subject.run
end
end
end end
context 'with empty filter tests file' do context 'with empty filter tests file' do
......
...@@ -38,6 +38,11 @@ module Tooling ...@@ -38,6 +38,11 @@ module Tooling
Knapsack.logger.info tests_to_run Knapsack.logger.info tests_to_run
Knapsack.logger.info Knapsack.logger.info
if tests_to_run.empty?
Knapsack.logger.info 'No tests to run on this node, exiting.'
return
end
exec(*rspec_command) exec(*rspec_command)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment