Skip to content

Commit

Permalink
Add missing expects to specs (#530)
Browse files Browse the repository at this point in the history
* Add missing expects to specs

* Apply suggestions from code review

Use array matcher

* Update CHANGELOG.md

---------

Co-authored-by: Jon Pascoe <[email protected]>
  • Loading branch information
artofhuman and pacso authored Jul 18, 2024
1 parent 6b999d7 commit 62ee3fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Removed use of `delegate` method added in [66f1d797](https://github.com/ice-cube-ruby/ice_cube/commit/66f1d797092734563bfabd2132c024c7d087f683) , reverting to previous implementation. ([#522](https://github.com/ice-cube-ruby/ice_cube/pull/522)) by [@pacso](https://github.com/pacso)
- Updated supported versions of Ruby and Rails and fixed standardrb lint issues. ([#552](https://github.com/ice-cube-ruby/ice_cube/pull/552)) by [@pacso](https://github.com/pacso)
- Fixed `I18n.load_path` injection ([#546](https://github.com/ice-cube-ruby/ice_cube/pull/546)) by [@glaszig](https://github.com/glaszig)
- Use `exepect` in specs ([#530](https://github.com/ice-cube-ruby/ice_cube/pull/530) by [@artofhuman](https://github.com/artofhuman))

### Fixed
- Fix for weekly interval results when requesting `occurrences_between` on a narrow range ([#487](https://github.com/seejohnrun/ice_cube/pull/487)) by [@jakebrady5](https://github.com/jakebrady5)
Expand Down
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

0 comments on commit 62ee3fd

Please sign in to comment.