Add optional host argument to ServerSocket
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668997 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/rb/spec/socket_spec.rb b/lib/rb/spec/socket_spec.rb
index cfd7c7b..4d129b0 100644
--- a/lib/rb/spec/socket_spec.rb
+++ b/lib/rb/spec/socket_spec.rb
@@ -89,6 +89,12 @@
@socket.handle.should be_an_instance_of(TCPServer)
end
+ it "should accept an optional host argument" do
+ @socket = ServerSocket.new('localhost', 1234)
+ TCPServer.should_receive(:new).with('localhost', 1234)
+ @socket.listen
+ end
+
it "should create a Thrift::Socket to wrap accepted sockets" do
handle = mock("TCPServer")
TCPServer.should_receive(:new).with(nil, 1234).and_return(handle)