Posted over 9 years ago. Visible to the public.

WebMock 1.8.0 does not play nice with Curb < 0.7.16

When updating WebMock, be prepared that your specs may send real requests into the depths of the internet unless you update Curb as well.\
WebMock will not complain about those requests not being stubbed.

One of the commits that made it into 1.8.0 actually breaks Curb versions below 0.7.16 while fixing it for that version (and above, hopefully).\
WebMock's hooks for Curl::Easy are still there, but they no longer work properly on older versions.

So, to upgrade WebMock properly, you need to change your Gemfile to also hold something like this for the curb dependencies:

Copy
gem webmock, '>= 1.8.0' gem curb, '>= 0.7.16'

For me this happened when stubbing calls for Savon, which was using Curb in the background.

Once an application no longer requires constant development, it needs periodic maintenance for stable and secure operation. makandra offers monthly maintenance contracts that let you focus on your business while we make sure the lights stay on.

Owner of this card:

Avatar
Arne Hartherz
Last edit:
over 9 years ago
Keywords:
curl
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Arne Hartherz to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more