Merged
Conversation
RSpec now compares ranges with `==` (equality) instead of `===` (inclusion). So `by(30..35)` won't match a number like 31 any more. Switch to `be_between` to preserve the original inclusive range intent. See: rspec/rspec@a8f86b7
d438a82 to
2dbf372
Compare
|
|
Review app deployed to https://cpd-ec2-review-2275-web.test.teacherservices.cloud |
ericaporter
reviewed
Feb 18, 2026
| maximum_records = minimum_records + described_class::SHARED_DELIVERY_PARTNERS_PER_LEAD_PROVIDER | ||
| expect { instance.plant }.to(change(LeadProviderDeliveryPartnership, :count).by(minimum_records..maximum_records)) | ||
| expect { instance.plant }.to(change(LeadProviderDeliveryPartnership, :count).by(be_between(minimum_records, maximum_records))) | ||
| end |
Contributor
There was a problem hiding this comment.
I think you can also have .by(a_value_between(etc.) which is slightly more readable
|
Review app for PR 2275 was deleted |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
RSpec now compares ranges with
==(equality) instead of===(inclusion). Soby(30..35)won't match a number like 31 any more.Switch to
be_betweento preserve the original inclusive range intent.See: rspec/rspec@a8f86b7
Fixes the failing test in #2272