It seems that Fakeweb doesn't like Mechanize agent's read_timeout= method #28

Merged
merged 1 commit into from Dec 2, 2013

Projects

None yet
@syborg
Contributor
syborg commented Aug 21, 2011

It seems that Fakeweb doesn't like Mechanize agent's read_timeout= method (http://stackoverflow.com/questions/7137467/ruby-fakeweb-error-if-a-mechanize-agents-read-timeout-is-called)

gaelian commented Mar 11, 2012

I've just run across a very similar error to this while using Fakeweb with Rspec to stub out Amazon S3 uploads with Paperclip:

NoMethodError:
   undefined method `read_timeout=' for #<FakeWeb::StubSocket:0x007f8a02f41a08 @closed=true>

Just wondering if this project is still being maintained?

wallace commented Apr 13, 2012

👍

+1

senny commented Aug 22, 2012

+1

+1

pjg commented Oct 15, 2012

I've just run into this issue while writing specs for Paperclip uploads to S3...

+1 (Fakeweb + Vcr)

nel commented Jan 2, 2013

+1

sparksp commented Jul 16, 2013

👍 this patch works for me with Paperclip/S3

@chrisk chrisk added a commit that referenced this pull request Dec 2, 2013
@chrisk Merge pull requests #28 (syborg) and #38 (trevorrowe)
This adds the timeout methods from Net::HTTP's socket proxy (Net::BufferedIO)
missing from our fake (StubSocket), fixing that Net::HTTP#read_timeout= and
Net::HTTP#continue_timeout= would raise NoMethodErrors when called after a
Net::HTTP object has handled a first fake request (i.e. after StubSocket has
been injected).
0deafd2
@chrisk chrisk merged commit 6179cc1 into chrisk:master Dec 2, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment