Module: Henitai::Integration
- Defined in:
- lib/henitai/integration.rb,
lib/henitai/integration/rspec_process_runner.rb
Overview
Namespace for test-framework integrations.
An Integration is responsible for:
1. Discovering test files relevant to a Subject (test selection)
2. Running the selected tests in a child process with a mutant injected
3. Reporting pass/fail/timeout to the runner
Test selection uses longest-prefix matching:
Subject expression "Foo::Bar#method" matches example groups whose
description contains "Foo::Bar" or "Foo::Bar#method".
Built-in integrations:
rspec — RSpec 3.x
Defined Under Namespace
Classes: Base, Minitest, Rspec, RspecProcessRunner, ScenarioLogSupport
Class Method Summary collapse
-
.for(name) ⇒ Class
Integration adapter for RSpec.
Class Method Details
.for(name) ⇒ Class
Integration adapter for RSpec.
This class exists as the stable public entry point for the RSpec integration, even though the concrete behavior is not implemented yet.
118 119 120 121 122 123 124 125 126 127 |
# File 'lib/henitai/integration.rb', line 118 def self.for(name) const_get(name.capitalize) rescue NameError available = constants.filter_map do |constant_name| integration = const_get(constant_name) constant_name.to_s.downcase if integration.is_a?(Class) && integration < Base end.sort.join(", ") raise ArgumentError, "Unknown integration: #{name}. Available: #{available}" end |