Skip to content

Commit 62ee3fd

Browse files
artofhumanpacso
andauthored
Add missing expects to specs (#530)
* Add missing expects to specs * Apply suggestions from code review Use array matcher * Update CHANGELOG.md --------- Co-authored-by: Jon Pascoe <[email protected]>
1 parent 6b999d7 commit 62ee3fd

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- 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)
1313
- 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)
1414
- Fixed `I18n.load_path` injection ([#546](https://github.com/ice-cube-ruby/ice_cube/pull/546)) by [@glaszig](https://github.com/glaszig)
15+
- Use `exepect` in specs ([#530](https://github.com/ice-cube-ruby/ice_cube/pull/530) by [@artofhuman](https://github.com/artofhuman))
1516

1617
### Fixed
1718
- 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)

spec/examples/schedule_spec.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -306,15 +306,15 @@
306306
it "should be equivalent to all_occurrences in terms of arrays" do
307307
schedule = IceCube::Schedule.new(Time.now, duration: IceCube::ONE_HOUR)
308308
schedule.add_recurrence_rule IceCube::Rule.daily.until(Time.now + 3 * IceCube::ONE_DAY)
309-
schedule.all_occurrences == schedule.all_occurrences_enumerator.to_a
309+
expect(schedule.all_occurrences).to match_array(schedule.all_occurrences_enumerator.to_a)
310310
end
311311
end
312312

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

@@ -795,7 +795,7 @@ def compare_time_zone_info(start_time)
795795
expect(occurrence.dst?).to eq(start_time.dst?) if start_time.respond_to? :dst?
796796
expect(occurrence.utc?).to eq(start_time.utc?) if start_time.respond_to? :utc?
797797
expect(occurrence.zone).to eq(start_time.zone)
798-
occurrence.utc_offset == start_time.utc_offset
798+
expect(occurrence.utc_offset).to eq(start_time.utc_offset)
799799
end
800800

801801
def trap_infinite_loop_beyond(iterations)

0 commit comments

Comments
 (0)