Class: Pinspec::Validate::PinScorer
- Inherits:
-
Object
- Object
- Pinspec::Validate::PinScorer
- Defined in:
- lib/pinspec/validate/pin_scorer.rb
Defined Under Namespace
Constant Summary collapse
- ASPECTS =
%i[return error jobs mail].freeze
- SCRATCH_DIR =
"tmp/pinspec/aspects"- STRONG =
80.0- WEAK =
40.0- WRAPPER =
"tmp/pinspec/run_suite.sh"
Instance Method Summary collapse
-
#initialize(app_root:, target:, plan:, corpus:, stability:, fk_map:, env: {}, test_command: nil) ⇒ PinScorer
constructor
A new instance of PinScorer.
- #run ⇒ Object
Constructor Details
#initialize(app_root:, target:, plan:, corpus:, stability:, fk_map:, env: {}, test_command: nil) ⇒ PinScorer
Returns a new instance of PinScorer.
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/pinspec/validate/pin_scorer.rb', line 54 def initialize(app_root:, target:, plan:, corpus:, stability:, fk_map:, env: {}, test_command: nil) @app_root = app_root @target = target @plan = plan @corpus = corpus @stability = stability @fk_map = fk_map @env = env @test_command = test_command end |
Instance Method Details
#run ⇒ Object
65 66 67 68 69 70 71 72 |
# File 'lib/pinspec/validate/pin_scorer.rb', line 65 def run MutationAdapter.refuse_unless_available! @command = @test_command || generate_wrapper scores = present_aspects.map { |aspect| score_aspect(aspect) } Report.new(subject: @target.qualified_name, scores: scores, skipped: excluded_aspects) end |