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

Add HasKeys parameter matcher #512

Closed
wants to merge 3 commits into from
Closed

Commits on Jun 12, 2021

  1. Add HasKeys parameter matcher

    Much like how `HasEntry` has a related `HasEntries` matcher, this commit
    adds a `HasKeys` matcher to accompany `HasKey`. With this new matcher,
    instead of the following:
    
    ```ruby
    object.expects(:method).with(all_of(has_key(:key_1), has_key(:key_2), has_key(:key_3)))
    ```
    
    We can just do this:
    
    ```ruby
    object.expects(:method).with(has_keys(:key_1, :key_2, :key_3))
    ```
    cstyles committed Jun 12, 2021
    Copy the full SHA
    fa8a55e View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    addb9f3 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    db95493 View commit details
    Browse the repository at this point in the history