Skip to content

Commit 5c970f3

Browse files
committed
Call comparators the same way Scientist does
This was messing me up when I was trying to mock stuff in tests :O
1 parent 7b056f9 commit 5c970f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/lab_tech/result.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def record_observation(scientist_observation, attrs = {})
115115
def record_simple_stats(scientist_result)
116116
cont, cands = scientist_result.control, scientist_result.candidates
117117

118-
self.equivalent = cands.all? { |cand| cand.equivalent_to?(cont, &experiment.comparator) }
118+
self.equivalent = cands.all? { |cand| cont.equivalent_to?(cand, &experiment.comparator) }
119119

120120
raised = ->(scientist_observation) { scientist_observation.exception.present? }
121121
self.raised_error = !raised.(cont) && cands.any?(&raised)

0 commit comments

Comments
 (0)