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

Fix a false positive for RSpec/PredicateMatcher when multiple arguments and not replaceable method #1554

Merged

Commits on Jan 16, 2023

  1. Fix a false positive for RSpec/PredicateMatcher when include with…

    … multiple arguments
    
    This PR is fix a false positive for `RSpec/PredicateMatcher` when `include` with multiple argument
    
    following code:
    ```ruby
    expect(foo).to include(foo, bar)
    ```
    
    `RSpec/PredicateMatcher` autocorrects it as follows:
    ```ruby
    expect(foo.include?(foo, bar)).to be(true)
    ```
    
    However, this is a SyntaxError.
    ```
    ArgumentError:
           wrong number of arguments (given 2, expected 1)
    ```
    ydah committed Jan 16, 2023
    Configuration menu
    Copy the full SHA
    5113d6f View commit details
    Browse the repository at this point in the history