-
Notifications
You must be signed in to change notification settings - Fork 976
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
feature: uri pattern for test mocking #552
feature: uri pattern for test mocking #552
Conversation
The failed test has nothing to do with the feature in this pull request.
|
@@ -85,7 +85,7 @@ def verify_stubbed_calls | |||
protected | |||
|
|||
def new_stub(request_method, path, headers = {}, body=nil, &block) | |||
normalized_path = Faraday::Utils.normalize_path(path) | |||
normalized_path = (path.is_a? Regexp) ? path : Faraday::Utils.normalize_path(path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style nitpick: could it be path.is_a?(Regexp)
instead?
Thanks for the feature proposal! Sorry about the CI failure; you can merge in latest master to fix that. In addition to addressing my thoughts in inline comments, could you also add code docs for this feature? I realize there is very little documentation for the Test adapter right now. Your PR could try to improve this while adding a new feature. At least some example use would be nice. |
d776652
to
ca66b2e
Compare
@mislav all done |
Hi @MidnightWonderer and sorry if your PR remained suspended for so much time. |
9be5e8d
to
ca939bf
Compare
@iMacTia done. |
This took a long time, but I'm happy to merge it in as it actually makes tests more powerful. |
Add regular expression to middleware matcher.