Sha256: 5ed032a4df5e2b9d150b0b2a07eeb934b5d58536e23913ea5e242795477e643f
Contents?: true
Size: 558 Bytes
Versions: 11
Compression:
Stored size: 558 Bytes
Contents
require 'helper' require 'fiber' describe EventMachine::HttpRequest do context "with fibers" do it "should be transparent to connection errors" do EventMachine.run do Fiber.new do f = Fiber.current fired = false http = EventMachine::HttpRequest.new('http://non-existing.domain/', :connection_timeout => 0.1).get http.callback { failed(http) } http.errback { f.resume :errback } Fiber.yield.should == :errback EM.stop end.resume end end end end
Version data entries
11 entries across 11 versions & 2 rubygems