Skip to content
Browse files

Merge pull request #232 from kybishop/master

Add support for subdomains in test_helper requests
  • Loading branch information...
2 parents c1d250b + 5c391a8 commit 29742a303b75e2d44ca878bd84848608713dc220 @dj2 dj2 committed Mar 26, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/goliath/test_helper.rb
View
4 lib/goliath/test_helper.rb
@@ -178,9 +178,11 @@ def options_request(request_data = {}, errback = nil, &blk)
end
def create_test_request(request_data)
+ domain = request_data.delete(:domain) || "localhost:#{@test_server_port}"
path = request_data.delete(:path) || ''
opts = request_data.delete(:connection_options) || {}
- EM::HttpRequest.new("http://localhost:#{@test_server_port}#{path}", opts)
+
+ EM::HttpRequest.new("http://#{domain}#{path}", opts)
end
private

0 comments on commit 29742a3

Please sign in to comment.
Something went wrong with that request. Please try again.