Class: Henitai::Integration::Minitest
Overview
Minitest integration adapter.
A sibling of Rspec behind Base: it shares the framework-agnostic mutant-run orchestration (MutantRunSupport) and test selection (RspecTestSelection) but implements its own Minitest-specific test invocation and suite command. Per-test coverage collection is not yet wired into this path.
Constant Summary
collapse
- DEFAULT_SUITE_TIMEOUT =
300.0
RspecTestSelection::REQUIRE_DIRECTIVE_PATTERN
Instance Method Summary
collapse
#select_tests
#build_result, #mutant_log_name, #scenario_log_paths
Methods inherited from Base
#cleanup_process_group, #reap_child, #select_tests, #wait_with_timeout
Instance Method Details
#per_test_coverage_supported? ⇒ Boolean
24
25
26
|
# File 'lib/henitai/integration/minitest.rb', line 24
def per_test_coverage_supported?
true
end
|
#run_in_child(mutant:, test_files:, log_paths:) ⇒ Object
38
39
40
41
42
|
# File 'lib/henitai/integration/minitest.rb', line 38
def run_in_child(mutant:, test_files:, log_paths:)
ENV["RAILS_ENV"] = "test" unless ENV["RAILS_ENV"] == "test"
preload_environment
super
end
|
#run_mutant(mutant:, test_files:, timeout:) ⇒ Object
28
29
30
31
|
# File 'lib/henitai/integration/minitest.rb', line 28
def run_mutant(mutant:, test_files:, timeout:)
setup_load_path
super
end
|
#run_suite(test_files, timeout: DEFAULT_SUITE_TIMEOUT) ⇒ Object
44
45
46
47
48
49
50
51
|
# File 'lib/henitai/integration/minitest.rb', line 44
def run_suite(test_files, timeout: DEFAULT_SUITE_TIMEOUT)
log_paths = scenario_log_paths("baseline")
pid = spawn_suite_process(test_files, log_paths)
wait_result = wait_with_timeout(pid, timeout)
build_result(wait_result, log_paths)
ensure
cleanup_suite_process(pid, wait_result)
end
|
#spawn_mutant(mutant:, test_files:) ⇒ Object
33
34
35
36
|
# File 'lib/henitai/integration/minitest.rb', line 33
def spawn_mutant(mutant:, test_files:)
setup_load_path
super
end
|
#test_files ⇒ Object
22
|
# File 'lib/henitai/integration/minitest.rb', line 22
def test_files = spec_files
|