1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eregon 2017-05-14 14:09:56 +00:00
parent d593aed7b7
commit a5b83b03ad
47 changed files with 254 additions and 172 deletions

View file

@ -6,8 +6,6 @@ describe "UNIXSocket#addr" do
platform_is_not :windows do
before :each do
@path = SocketSpecs.socket_path
rm_r @path
@server = UNIXServer.open(@path)
@client = UNIXSocket.open(@path)
end
@ -15,7 +13,7 @@ describe "UNIXSocket#addr" do
after :each do
@client.close
@server.close
rm_r @path
SocketSpecs.rm_socket @path
end
it "returns the address family of this socket in an array" do

View file

@ -14,7 +14,7 @@ describe "UNIXSocket.open" do
after :each do
@server.close
rm_r @path
SocketSpecs.rm_socket @path
end
it "opens a unix socket on the specified file and yields it to the block" do

View file

@ -7,7 +7,6 @@ platform_is_not :windows do
before :each do
@path = SocketSpecs.socket_path
rm_r @path
@server = UNIXServer.open(@path)
@s1 = UNIXSocket.new(@path)
@s2 = @server.accept
@ -17,7 +16,7 @@ platform_is_not :windows do
@server.close
@s1.close
@s2.close
rm_r @path
SocketSpecs.rm_socket @path
end
it_should_behave_like "partially closable sockets"

View file

@ -6,8 +6,6 @@ describe "UNIXSocket#path" do
platform_is_not :windows do
before :each do
@path = SocketSpecs.socket_path
rm_r @path
@server = UNIXServer.open(@path)
@client = UNIXSocket.open(@path)
end
@ -15,7 +13,7 @@ describe "UNIXSocket#path" do
after :each do
@client.close
@server.close
rm_r @path
SocketSpecs.rm_socket @path
end
it "returns the path of the socket if it's a server" do

View file

@ -6,8 +6,6 @@ describe "UNIXSocket#peeraddr" do
platform_is_not :windows do
before :each do
@path = SocketSpecs.socket_path
rm_r @path
@server = UNIXServer.open(@path)
@client = UNIXSocket.open(@path)
end
@ -15,7 +13,7 @@ describe "UNIXSocket#peeraddr" do
after :each do
@client.close
@server.close
rm_r @path
SocketSpecs.rm_socket @path
end
it "returns the address familly and path of the server end of the connection" do

View file

@ -20,7 +20,7 @@ describe "UNIXSocket#recv_io" do
@file.close
@client.close
@server.close
rm_r @path
SocketSpecs.rm_socket @path
end
it "reads an IO object across the socket" do

View file

@ -6,8 +6,6 @@ describe "UNIXSocket#recvfrom" do
platform_is_not :windows do
before :each do
@path = SocketSpecs.socket_path
rm_r @path
@server = UNIXServer.open(@path)
@client = UNIXSocket.open(@path)
end
@ -15,7 +13,7 @@ describe "UNIXSocket#recvfrom" do
after :each do
@client.close
@server.close
rm_r @path
SocketSpecs.rm_socket @path
end
it "receives len bytes from sock" do

View file

@ -20,7 +20,7 @@ describe "UNIXSocket#send_io" do
@file.close
@client.close
@server.close
rm_r @path
SocketSpecs.rm_socket @path
end
it "sends the fd for an IO object across the socket" do

View file

@ -11,7 +11,7 @@ describe :unixsocket_new, shared: true do
after :each do
@client.close if @client
@server.close
rm_r @path
SocketSpecs.rm_socket @path
end
it "opens a unix socket on the specified file" do