Module: Mutant::Bootstrap Private
- Includes:
- Unparser::Adamantium
- Defined in:
- lib/mutant/bootstrap.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Bootstrap process
The role of the boostrap is to take the pure config and apply it against the impure world to produce an environment.
env = config interpreted against the world
rubocop:disable Metrics/ModuleLength
Constant Summary collapse
- UNMATCHED_CONTEXT_MAP =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
"The coverage recording names no test that this suite runs, so it cannot\nsay which tests cover a subject.\n\nRecord it again from the project root, with the suite mutant runs. A suite\nthat starts simplecov unconditionally rewrites the recording every time\nmutant runs it, so start simplecov only when measuring coverage.\n"- SEMANTICS_MESSAGE_FORMAT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
"%<message>s. Fix your lib to follow normal ruby semantics!\n" \ '{Module,Class}#name should return resolvable constant name as String or nil'
- CLASS_NAME_RAISED_EXCEPTION =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'%<scope_class>s#name from: %<scope>s raised an error: %<exception>s'- CLASS_NAME_TYPE_MISMATCH_FORMAT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'%<scope_class>s#name from: %<raw_scope>s returned %<name>s'
Class Method Summary collapse
-
.call(env) ⇒ Either<String, Env>
private
Run Bootstrap.
-
.call_test(env) ⇒ Either<String, Env>
private
Run test only bootstrap.
Class Method Details
.call(env) ⇒ Either<String, Env>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Run Bootstrap
rubocop:disable Metrics/MethodLength
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/mutant/bootstrap.rb', line 43 def self.call(env) env.record(:bootstrap) do env = load_hooks(env) .tap(&method(:infect)) .with(matchable_scopes: matchable_scopes(env)) matched_subjects = env.record(:subject_match) do Matcher.(env:).call(env) end selected_subjects = subject_select(env, matched_subjects) mutations = env.record(:mutation_generate) do selected_subjects.flat_map(&:mutations) end setup_integration( env:, mutations:, selected_subjects: ) end end |
.call_test(env) ⇒ Either<String, Env>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Run test only bootstrap
73 74 75 76 77 78 79 80 81 82 |
# File 'lib/mutant/bootstrap.rb', line 73 def self.call_test(env) env.record(:bootstrap) do env = load_hooks(env).tap(&method(:infect)) setup_integration( env: env, mutations: [], selected_subjects: [] ) end end |