Skip to content
Browse files

Added test_helper support for subdomains

  • Loading branch information...
1 parent c1d250b commit 8d3c22db2dcd9029f9dfa5cfad46bf7dc6d740fe @kybishop 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
@@ -179,8 +179,10 @@ def options_request(request_data = {}, errback = nil, &blk)
def create_test_request(request_data)
path = request_data.delete(:path) || ''
+ subdomain = request_data.delete(:subdomain) || ''
opts = request_data.delete(:connection_options) || {}
- EM::HttpRequest.new("http://localhost:#{@test_server_port}#{path}", opts)
+
+ EM::HttpRequest.new("http://#{subdomain}localhost:#{@test_server_port}#{path}", opts)
end
private

0 comments on commit 8d3c22d

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