Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Use array matcher
  • Loading branch information
pacso authored Jul 18, 2024
1 parent 45c7d2b commit eca5390
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/examples/schedule_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -306,15 +306,15 @@
it "should be equivalent to all_occurrences in terms of arrays" do
schedule = IceCube::Schedule.new(Time.now, duration: IceCube::ONE_HOUR)
schedule.add_recurrence_rule IceCube::Rule.daily.until(Time.now + 3 * IceCube::ONE_DAY)
expect(schedule.all_occurrences).to eq(schedule.all_occurrences_enumerator.to_a)
expect(schedule.all_occurrences).to match_array(schedule.all_occurrences_enumerator.to_a)
end
end

describe :remaining_occurrences_enumerator do
it "should be equivalent to remaining_occurrences in terms of arrays" do
schedule = IceCube::Schedule.new(Time.now, duration: IceCube::ONE_HOUR)
schedule.add_recurrence_rule IceCube::Rule.daily.until(Time.now + 3 * IceCube::ONE_DAY)
expect(schedule.remaining_occurrences).to eq(schedule.remaining_occurrences_enumerator.to_a)
expect(schedule.remaining_occurrences).to match_array(schedule.remaining_occurrences_enumerator.to_a)
end
end

Expand Down

0 comments on commit eca5390

Please sign in to comment.