spec/async/io/socket/tcp_spec.rb in async-io-1.22.0 vs spec/async/io/socket/tcp_spec.rb in async-io-1.23.0

- old
+ new

@@ -45,10 +45,11 @@ describe 'basic tcp server' do it "should start server and send data" do reactor.async do Async::IO::Socket.connect(server_address) do |client| client.write(data) + client.close_write expect(client.read(512)).to be == data end end end @@ -57,20 +58,22 @@ describe 'non-blocking tcp connect' do it "can specify local address" do reactor.async do |task| Async::IO::Socket.connect(server_address, local_address: local_address) do |client| client.write(data) + client.close_write expect(client.read(512)).to be == data end end end it "should start server and send data" do reactor.async do |task| Async::IO::Socket.connect(server_address) do |client| client.write(data) + client.close_write expect(client.read(512)).to be == data end end end @@ -82,9 +85,10 @@ expect(socket).to_not be_nil expect(socket).to be_kind_of Async::Wrapper reactor.async do socket.write(data) + socket.close_write expect(socket.read(512)).to be == data socket.close end