spec/spec_helper.rb in reel-0.4.0.pre7 vs spec/spec_helper.rb in reel-0.4.0
- old
+ new
@@ -22,20 +22,19 @@
yield server
ensure
server.terminate if server && server.alive?
end
-def with_socket_pair(buffer_size = nil)
+def with_socket_pair
host = '127.0.0.1'
port = 10101
server = TCPServer.new(host, port)
client = TCPSocket.new(host, port)
peer = server.accept
begin
- connection = Reel::Connection.new(peer, buffer_size)
- yield client, connection
+ yield client, peer
ensure
server.close rescue nil
client.close rescue nil
peer.close rescue nil
end