mirror of
https://github.com/ruby/ruby.git
synced 2025-08-26 14:34:39 +02: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
|
@ -3,8 +3,9 @@ require File.expand_path('../../fixtures/classes', __FILE__)
|
|||
|
||||
describe "BasicSocket#send" do
|
||||
before :each do
|
||||
@server = TCPServer.new('127.0.0.1', SocketSpecs.port)
|
||||
@socket = TCPSocket.new('127.0.0.1', SocketSpecs.port)
|
||||
@server = TCPServer.new('127.0.0.1', 0)
|
||||
@port = @server.addr[1]
|
||||
@socket = TCPSocket.new('127.0.0.1', @port)
|
||||
end
|
||||
|
||||
after :each do
|
||||
|
@ -74,7 +75,7 @@ describe "BasicSocket#send" do
|
|||
Thread.pass while t.status and t.status != "sleep"
|
||||
t.status.should_not be_nil
|
||||
|
||||
sockaddr = Socket.pack_sockaddr_in(SocketSpecs.port, "127.0.0.1")
|
||||
sockaddr = Socket.pack_sockaddr_in(@port, "127.0.0.1")
|
||||
@socket.send('hello', 0, sockaddr).should == 5
|
||||
@socket.shutdown # indicate, that we are done sending
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue