Class: RSpec::Covers::Tracer::LCBA
- Inherits:
-
Object
- Object
- RSpec::Covers::Tracer::LCBA
- Defined in:
- lib/rspec/covers/tracer/lcba.rb
Instance Method Summary collapse
Instance Method Details
#score(call_log:, candidates:) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/rspec/covers/tracer/lcba.rb', line 7 def score(call_log:, candidates:, **) labels = call_log&.labels_before_expectations || [] candidates.each_with_object({}) do |candidate, scores| scores[candidate.label] = labels.include?(candidate.label) ? 1.0 : 0.0 end end |