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 online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
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)