I am working on a ruby application that uses the geocoder gem to generate location information from addresses. I am trying to use webmock to stub out calls to the api during testing.
Webmock has the option of creating a mock response from a file and has an explanation of how to replay responses recorded with curl -is
https://github.com/bblimke/webmock#replaying-raw-responses-recorded-with-curl--is
I have previously got this to work with different urls but not when trying with the following command.
curl -is http://maps.googleapis.com/maps/api/geocode/json?address=Falmouth,%20Cornwall&language=en&sensor=false > other.txt
When I run the above command all the data I want is outputted to the terminal correctly but nothing at all written to file. I have tried with the --no-keepalive
option but that does not fix it