Skip to content

Commit

Permalink
DRY out test
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarin committed Oct 26, 2023
1 parent 47c2209 commit c6f277e
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions spec/shared_print/finder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,19 @@ def phase_in_phase_out(input_phases)
# Look up commitments using a phase array.
# Expect the phases of all commitments in the output
# to match the phases of the input.
phase_in_phase_out([1])
phase_in_phase_out([2])
phase_in_phase_out([3])
phase_in_phase_out([1, 2])
phase_in_phase_out([2, 3])
phase_in_phase_out([1, 2, 3])
phase_in_phase_out([])
test_cases = [
[],
[1],
[2],
[3],
[1, 2],
[2, 3],
[1, 3],
[1, 2, 3]
]
test_cases.each do |input_phases|
phase_in_phase_out(input_phases)
end
end
end

Expand Down

0 comments on commit c6f277e

Please sign in to comment.