Read more

WebMock 1.8.0 does not play nice with Curb < 0.7.16

Arne Hartherz
February 24, 2012Software engineer at makandra GmbH

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

Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

One of the commits Show archive.org snapshot 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:

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.

Posted by Arne Hartherz to makandra dev (2012-02-24 16:52)