I'd like to stub https
call using webmock
.
Let's assume gateway url as https://some_gateway.com
.
After doing:
stub_request(:post, 'https://some_gateway.com').with(body: {})
in specs.
I use Net::HTTP to generate request:
Net::HTTP.post_form(URI.parse('https://some_gateway.com'), {})
I receive problem because Webmock expects https://some_gateway.com
but receives version with added port 433 so: http://www.secure.fake-payment.com:443/gateway_prod
so can't see registered stub.
How can I deal with this behavior ?