>
> I'm experiencing a weird issue with Fakeweb. This is with Ruby 1.8.7
> on Mac OSX's latest incarnation.
>
> this code:
>
> #require 'fake_web'
>
> def test_image_check
> url = URI.parse("http://images.scripting.com/archiveScriptingCom/
> 2009/01/23/obamasOnTV.jpg")
> http = Net::HTTP.new(url.host, url.port)
> http.read_timeout = 2
> http.open_timeout = 2
> resp = http.start() {|http| http.get(url.path) }
> return resp.code, resp.body
> rescue Timeout::Error
> return nil, nil
> rescue Exception
> puts "Error: #{$!}"
> end
>
> works fine - the image is downloaded, returned. Note in the above
> case I've commented out the FakeWeb require. Now remove the pound
> sign in front of the require, and rerun the test. Test catches
> Interrupted system call error - every time its run. Now obviously if
> I had defined some behavior by calling register_uri that would be one
> thing, but I've done nothing but the require.
>
> Any ideas?
Hi Logan,
I actually fixed a very similar-sounding issue in my fork on GitHub. I
was noticing it with an older version of Ruby I encountered, 1.8.6 p36.
Are you using one of the forks from GitHub, like chrisk-fakeweb? Or
just the fakeweb gem from rubyforge?
If you can tell me both the name and version of the fakeweb gem you're
using, as well as the exact Ruby version (e.g. with `ruby -v`), I'll
try to duplicate the issue here.
Thanks-
Chris