rubocop / rubocop-rspec

Code style checking for RSpec files.
https://docs.rubocop.org/rubocop-rspec
MIT License
811 stars 276 forks source link

Revert an change that would conceal unintentional RSpec syntax #1985

Closed pirj closed 1 month ago

pirj commented 1 month ago

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:

ydah commented 1 month ago

Thank you!