Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing expects to specs #530

Merged
merged 4 commits into from
Jul 18, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 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)
schedule.all_occurrences == 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)
schedule.remaining_occurrences == schedule.remaining_occurrences_enumerator.to_a
expect(schedule.remaining_occurrences).to match_array(schedule.remaining_occurrences_enumerator.to_a)
end
end

Expand Down Expand Up @@ -795,7 +795,7 @@ def compare_time_zone_info(start_time)
expect(occurrence.dst?).to eq(start_time.dst?) if start_time.respond_to? :dst?
expect(occurrence.utc?).to eq(start_time.utc?) if start_time.respond_to? :utc?
expect(occurrence.zone).to eq(start_time.zone)
occurrence.utc_offset == start_time.utc_offset
expect(occurrence.utc_offset).to eq(start_time.utc_offset)
end

def trap_infinite_loop_beyond(iterations)
Expand Down
Loading