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

Revert an change that would conceal unintentional RSpec syntax #1985

Merged
merged 2 commits into from
Oct 26, 2024

Conversation

pirj
Copy link
Member

@pirj pirj commented Oct 25, 2024

Specifically:

expect { ... }.to change { ... }.by(...) and change { ... }.by(...)

Here the usage of and is incorrect, as RSpec does not (and can't reasonably) support it.
Compound should use the and method, not the operator, or the &. Same for .or and |.

Related: #1984 #1983


Before submitting the PR make sure the following are checked:

  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • [-] Added tests.
  • [-] Updated documentation.
  • Added an entry to the CHANGELOG.md if the new code introduces user-observable changes.
  • The build (bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).

Specifically:

    expect { ... }.to change { ... }.by(...) and change { ... }.by(...)

Here the usage of `and` is incorrect, as RSpec does not (and can't
reasonably) support it.
Compound should use the `and` method, not the operator, or the `&`. Same
for `.or` and `|`.
@pirj pirj requested a review from a team as a code owner October 25, 2024 14:27
@pirj pirj self-assigned this Oct 25, 2024
CHANGELOG.md Outdated Show resolved Hide resolved
@ydah ydah merged commit 6584b4a into master Oct 26, 2024
24 checks passed
@ydah ydah deleted the revert-unwanted-change branch October 26, 2024 06:46
@ydah
Copy link
Member

ydah commented Oct 26, 2024

Thank you!

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

Successfully merging this pull request may close these issues.

3 participants