Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes in VCR 1.1.2 conflict with webmock #14

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

Changes in VCR 1.1.2 conflict with webmock #14

bblimke opened this issue Sep 23, 2010 · 3 comments

Comments

@bblimke
Copy link
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)
@myronmarston
Copy link
Member

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.

@myronmarston
Copy link
Member

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.

@bblimke
Copy link
Contributor Author

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants