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

Specifying http method as a string doesn't work #821

Open
deadeyejoe opened this issue May 27, 2019 · 1 comment
Open

Specifying http method as a string doesn't work #821

deadeyejoe opened this issue May 27, 2019 · 1 comment

Comments

@deadeyejoe
Copy link

deadeyejoe commented May 27, 2019

I'm using webmock v3.5.1 on ruby 2.6.1

The following example will fail:

stub_request("get","http://example.com")
HTTParty.get("http://example.com")

And the output includes the text

registered request stubs:
     
stub_request(:get, "http://example.com/")

I think this is needlessly confusing: the output clearly implies that it's valid to pass the method as a string or a symbol.

@bblimke
Copy link
Owner

bblimke commented Jul 13, 2019

I agree there is no harm of accepting both symbol or string. The change will have to be applied and tested against not only stub_request but a_request, have_requested and all WebMock public methods that accept the method argument. I'll be happy to accept a PR with the change.

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

No branches or pull requests

2 participants