with(query: ...) doesn't match if using Regexp URL matcher #195

Closed
dlee opened this Issue Jul 12, 2012 · 4 comments

3 participants

@dlee

Using .with(query: ...) works with string URL matchers, but not with Regexp URL matchers.

For example, the following string-based stub works:

stub_request(:get, "www.example.com").with(:query => {"a" => ["b", "c"]})
RestClient.get("http://www.example.com/?a[]=b&a[]=c") # ===> Success

but the following Regexp-based stub does not:

stub_request(:get, /www.example.com/).with(:query => {"a" => ["b", "c"]})
RestClient.get("http://www.example.com/?a[]=b&a[]=c") # ===> FAIL!
@epinault

have you found a workaround ? I have the same issue:(

@dlee

@epinault-ttc I haven't found a workaround :(

@bblimke
Owner

@dlee @epinault-ttc Have you tried with WebMock 1.8.9?

@bblimke bblimke closed this Aug 28, 2012
@bblimke
Owner

works fine in WebMock 1.8.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment