Sha256: bbcad9563bcfeb8fab6b3b7654f8ae6148ed85741023b046c27b00dea4315aca
Contents?: true
Size: 510 Bytes
Versions: 3
Compression:
Stored size: 510 Bytes
Contents
require "spec/helper/all" describe EventMachine::Synchrony::TCPSocket do it 'connects to a TCP port' do EventMachine.synchrony do @socket = EventMachine::Synchrony::TCPSocket.new 'eventmachine.rubyforge.org', 80 @socket.should_not be_error EM.stop end end it 'errors on connection failure' do EventMachine.synchrony do proc { EventMachine::Synchrony::TCPSocket.new 'localhost', 12345 }.should raise_error(SocketError) EM.stop end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
em-synchrony-1.0.0 | spec/tcpsocket_spec.rb |
em-synchrony-0.3.0.beta.1 | spec/tcpsocket_spec.rb |
em-synchrony-0.2.0 | spec/tcpsocket_spec.rb |