Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Prevent mismatched composed use of value and block matchers #1476

Merged
merged 1 commit into from
Aug 18, 2024

Conversation

pirj
Copy link
Member

@pirj pirj commented Aug 4, 2024

  expect { arr << :foo }
-   .to change { arr }.to be_one
+   .to change { arr }.to(be_one)
    .and change { arr }.to include(:foo)

This is to detect mismatches like this.

@pirj pirj requested a review from JonRowe August 4, 2024 14:30
@pirj pirj self-assigned this Aug 4, 2024
@pirj pirj force-pushed the error-on-improperly-composing-matchers branch from 237603e to 8aa5204 Compare August 4, 2024 14:42
@pirj pirj force-pushed the error-on-improperly-composing-matchers branch from 8aa5204 to 0c5595c Compare August 18, 2024 11:47
@pirj pirj force-pushed the error-on-improperly-composing-matchers branch from 0c5595c to 7f9bfa4 Compare August 18, 2024 12:12
@pirj pirj merged commit ff04d47 into main Aug 18, 2024
30 checks passed
JonRowe pushed a commit that referenced this pull request Aug 20, 2024
…chers

Prevent mismatched composed use of value and block matchers
@JonRowe JonRowe deleted the error-on-improperly-composing-matchers branch August 20, 2024 20:35
@JonRowe
Copy link
Member

JonRowe commented Aug 20, 2024

Released in 3.13.2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants