|
11 | 11 | # @see https://github.com/simplecov-ruby/simplecov/issues/86 |
12 | 12 | # @see https://jira.codehaus.org/browse/JRUBY-6106 |
13 | 13 |
|
14 | | - warn 'Coverage may be inaccurate; set the "--debug" command line option,' \ |
15 | | - ' or do JRUBY_OPTS="--debug"' \ |
16 | | - ' or set the "debug.fullTrace=true" option in your .jrubyrc' |
| 14 | + warn 'Coverage may be inaccurate; set the "--debug" command line option, ' \ |
| 15 | + 'or do JRUBY_OPTS="--debug" ' \ |
| 16 | + 'or set the "debug.fullTrace=true" option in your .jrubyrc' |
17 | 17 | end |
18 | 18 |
|
19 | 19 | # |
@@ -48,8 +48,8 @@ class << self |
48 | 48 | def start(profile = nil, &block) |
49 | 49 | require "coverage" |
50 | 50 | initial_setup(profile, &block) |
51 | | - require_relative "./simplecov/process" if SimpleCov.enabled_for_subprocesses? && |
52 | | - ::Process.respond_to?(:fork) |
| 51 | + require_relative "simplecov/process" if SimpleCov.enabled_for_subprocesses? && |
| 52 | + ::Process.respond_to?(:fork) |
53 | 53 |
|
54 | 54 | make_parallel_tests_available |
55 | 55 |
|
@@ -301,7 +301,7 @@ def round_coverage(coverage) |
301 | 301 |
|
302 | 302 | def initial_setup(profile, &block) |
303 | 303 | load_profile(profile) if profile |
304 | | - configure(&block) if block_given? |
| 304 | + configure(&block) if block |
305 | 305 | self.running = true |
306 | 306 | end |
307 | 307 |
|
@@ -347,9 +347,9 @@ def start_coverage_measurement |
347 | 347 | end |
348 | 348 |
|
349 | 349 | def start_coverage_with_criteria |
350 | | - start_arguments = coverage_criteria.map do |criterion| |
| 350 | + start_arguments = coverage_criteria.to_h do |criterion| |
351 | 351 | [lookup_corresponding_ruby_coverage_name(criterion), true] |
352 | | - end.to_h |
| 352 | + end |
353 | 353 |
|
354 | 354 | start_arguments[:eval] = true if coverage_for_eval_enabled? |
355 | 355 |
|
@@ -432,7 +432,7 @@ def make_parallel_tests_available |
432 | 432 | end |
433 | 433 |
|
434 | 434 | def probably_running_parallel_tests? |
435 | | - ENV["TEST_ENV_NUMBER"] && ENV["PARALLEL_TEST_GROUPS"] |
| 435 | + ENV.fetch("TEST_ENV_NUMBER", nil) && ENV.fetch("PARALLEL_TEST_GROUPS", nil) |
436 | 436 | end |
437 | 437 | end |
438 | 438 | end |
|
0 commit comments