Class: SimpleCov::ParallelAdapters::GenericAdapter
- Defined in:
- lib/simplecov/parallel_adapters/generic.rb,
sig/simplecov.rbs
Overview
Catch-all adapter for runners that follow the TEST_ENV_NUMBER /
PARALLEL_TEST_GROUPS env-var convention without shipping a Ruby
API (parallel_rspec, knapsack-style splitters, custom CI sharding).
Activates when TEST_ENV_NUMBER is set, unless
SimpleCov.parallel_tests false opted out.
Class Method Summary collapse
- .active? ⇒ Boolean
- .expected_worker_count ⇒ Integer
-
.first_worker? ⇒ Boolean
First worker is TEST_ENV_NUMBER "" (parallel_tests convention) or "1" (runners that number from 1).
Methods inherited from Base
forced_off?, native_wait?, parallel_test_groups_count, wait_for_siblings
Class Method Details
.active? ⇒ Boolean
26 27 28 29 30 |
# File 'lib/simplecov/parallel_adapters/generic.rb', line 26 def active? return false if forced_off? ENV.key?("TEST_ENV_NUMBER") end |
.expected_worker_count ⇒ Integer
39 40 41 |
# File 'lib/simplecov/parallel_adapters/generic.rb', line 39 def expected_worker_count parallel_test_groups_count end |
.first_worker? ⇒ Boolean
First worker is TEST_ENV_NUMBER "" (parallel_tests convention) or "1" (runners that number from 1).
35 36 37 |
# File 'lib/simplecov/parallel_adapters/generic.rb', line 35 def first_worker? ["", "1"].include?(ENV.fetch("TEST_ENV_NUMBER", nil)) end |