Instance variables should not be visible from your test :)
Expectation on TCPSocket perhaps? Or use a "fake" server"?