Browse files

Fix scenario to use new em-http-request 1.0 APIs.

  • Loading branch information...
1 parent b4fcf22 commit c130bc5cd641a64e341316da48f1015bf9797582 @myronmarston committed Feb 26, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −3 features/http_libraries/em_http_request.feature
View
9 features/http_libraries/em_http_request.feature
@@ -145,13 +145,16 @@ Feature: EM HTTP Request
multi = EventMachine::MultiRequest.new
%w[ foo bar bazz ].each do |path|
- multi.add(EventMachine::HttpRequest.new("http://localhost:7777/#{path}").get)
+ multi.add(path, EventMachine::HttpRequest.new("http://localhost:7777/#{path}").get)
end
multi.callback do
- multi.responses[:succeeded].each do |http|
- puts http.response
+ responses = Hash[multi.responses[:callback]]
+
+ %w[ foo bar bazz ].each do |path|
+ puts responses[path].response
end
+
EventMachine.stop
end
end

0 comments on commit c130bc5

Please sign in to comment.