spec/external_spec.rb in em-http-request-1.0.0.beta.2 vs spec/external_spec.rb in em-http-request-1.0.0.beta.3

- old
+ new

@@ -13,9 +13,21 @@ EM.stop } } end + it "should follow redirect to https and initiate the handshake" do + EventMachine.run { + http = EventMachine::HttpRequest.new('http://analytics.postrank.com/').get :redirects => 5 + + http.errback { failed(http) } + http.callback { + http.response_header.status.should == 200 + EventMachine.stop + } + } + end + it "should perform a streaming GET" do EventMachine.run { # digg.com uses chunked encoding http = EventMachine::HttpRequest.new('http://digg.com/news').get