mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@cd1b911
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5ccf36c7ec
commit
2bdce358e6
53 changed files with 319 additions and 426 deletions
|
@ -5,7 +5,8 @@ require File.expand_path('../../fixtures/classes', __FILE__)
|
|||
describe "BasicSocket#recv" do
|
||||
|
||||
before :each do
|
||||
@server = TCPServer.new('127.0.0.1', SocketSpecs.port)
|
||||
@server = TCPServer.new('127.0.0.1', 0)
|
||||
@port = @server.addr[1]
|
||||
end
|
||||
|
||||
after :each do
|
||||
|
@ -23,7 +24,7 @@ describe "BasicSocket#recv" do
|
|||
Thread.pass while t.status and t.status != "sleep"
|
||||
t.status.should_not be_nil
|
||||
|
||||
socket = TCPSocket.new('127.0.0.1', SocketSpecs.port)
|
||||
socket = TCPSocket.new('127.0.0.1', @port)
|
||||
socket.send('hello', 0)
|
||||
socket.close
|
||||
|
||||
|
@ -46,7 +47,7 @@ describe "BasicSocket#recv" do
|
|||
Thread.pass while t.status and t.status != "sleep"
|
||||
t.status.should_not be_nil
|
||||
|
||||
socket = TCPSocket.new('127.0.0.1', SocketSpecs.port)
|
||||
socket = TCPSocket.new('127.0.0.1', @port)
|
||||
socket.send('helloU', Socket::MSG_OOB)
|
||||
socket.shutdown(1)
|
||||
t.join
|
||||
|
@ -67,7 +68,7 @@ describe "BasicSocket#recv" do
|
|||
Thread.pass while t.status and t.status != "sleep"
|
||||
t.status.should_not be_nil
|
||||
|
||||
socket = TCPSocket.new('127.0.0.1', SocketSpecs.port)
|
||||
socket = TCPSocket.new('127.0.0.1', @port)
|
||||
socket.write("firstline\377secondline\377")
|
||||
socket.close
|
||||
|
||||
|
@ -77,7 +78,7 @@ describe "BasicSocket#recv" do
|
|||
|
||||
ruby_version_is "2.3" do
|
||||
it "allows an output buffer as third argument" do
|
||||
socket = TCPSocket.new('127.0.0.1', SocketSpecs.port)
|
||||
socket = TCPSocket.new('127.0.0.1', @port)
|
||||
socket.write("data")
|
||||
|
||||
client = @server.accept
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue