Permalink
Browse files

open the correct port for an http request

  • Loading branch information...
1 parent 312173f commit d0fa99ea070a8d56a4c65319ba2d8b64e2aa7916 @kbrock kbrock committed Apr 17, 2013
Showing with 13 additions and 1 deletion.
  1. +1 −1 lib/celluloid-http/connection.rb
  2. +12 −0 test/unit/connection_test.rb
@@ -32,7 +32,7 @@ def response
def self.open(host, port = 80)
connection = self.new
- connection.open(host, 80)
+ connection.open(host, port)
connection
end
@@ -0,0 +1,12 @@
+require 'test_helper'
+
+class ConnectionTest < TestCase
+
+ def test_static_constructor
+ connection = mock('Connection')
+ connection.expects(:open).with('host',8080)
+ Celluloid::Http::Connection.expects(:new).returns(connection)
+
+ Celluloid::Http::Connection.open('host',8080)
+ end
+end

0 comments on commit d0fa99e

Please sign in to comment.