Changes in VCR 1.1.2 conflict with webmock #14

Closed
bblimke opened this Issue Sep 23, 2010 · 3 comments

Comments

Projects
None yet
2 participants
Contributor

bblimke commented Sep 23, 2010

The following code throws : Net::HTTPOK#read_body called twice (IOError)

require 'rubygems'
require 'vcr'
require 'open-uri'

VCR.config do |c|
  c.cassette_library_dir = 'test/fakeweb'
  c.http_stubbing_library = :webmock
end

WebMock.allow_net_connect!
url = 'http://www.wp.pl'
open(url)
Owner

myronmarston commented Sep 27, 2010

Fix WebMock/Net::HTTP integration.

Rather than using a Net::HTTP monkey patch to record new requests, use WebMock's callback. This prevents the monkey patches from colliding each other and ensures that VCR & WebMock work properly with Open URI.

Closed by aec21b4.

Owner

myronmarston commented Sep 27, 2010

Hey Bartosz,

Thanks for reporting this. If you try the latest VCR head, it should work now. I've got a few more things I'd like to get done before releasing VCR 1.2.0. I hope to release 1.2.0 later this week.

Contributor

bblimke commented Sep 27, 2010

Great! Thank you Myron.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment