Module: RspecSprint::Ranker
- Defined in:
- lib/rspec_sprint/ranker.rb
Overview
Runs every rule against a snapshot, drops the ones that didn’t fire (signal-gated, design D8), and returns the strongest few by score.
Constant Summary collapse
- RULES =
%i[factory_dominance path_group_skew slow_examples_concentration].freeze
- MAX_FINDINGS =
3
Class Method Summary collapse
Class Method Details
.call(snapshot) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/rspec_sprint/ranker.rb', line 14 def call(snapshot) RULES .map { |rule| Rules.public_send(rule, snapshot) } .compact .sort_by { |finding| -finding.score } .first(MAX_FINDINGS) end |