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

Support multiple methods in responds_with matcher #579

Merged
merged 1 commit into from
Nov 12, 2023

Conversation

floehopper
Copy link
Member

Addresses #578.

@floehopper floehopper force-pushed the enhance-responds-with-matcher branch from 4ce03e9 to 2755b2c Compare November 2, 2022 16:52
@floehopper floehopper marked this pull request as ready for review November 2, 2022 16:53
@floehopper floehopper force-pushed the enhance-responds-with-matcher branch from 2755b2c to 4c8ac91 Compare November 12, 2023 10:56
This provides a terser syntax for matching an object which responds in a
certain way, e.g.

    object = mock()
    object.expects(:method_1).with(responds_with(:upcase => "FOO", :reverse => "oof"))
    object.method_1("foo")
    # no error raised, because "foo".upcase == "FOO" and "foo".reverse == "oof"

Addresses #578.
@floehopper floehopper force-pushed the enhance-responds-with-matcher branch from 4c8ac91 to 095b37e Compare November 12, 2023 11:14
@floehopper floehopper merged commit f086b7e into main Nov 12, 2023
16 checks passed
@floehopper floehopper deleted the enhance-responds-with-matcher branch November 12, 2023 11:17
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.

2 participants