summaryrefslogtreecommitdiff
path: root/spec/ruby/library/socket/unixsocket/partially_closable_spec.rb
blob: bbe1a8a5ba790f3d7ec12d6f2062e6ebba8959c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require_relative '../../../spec_helper'
require_relative '../fixtures/classes'
require_relative '../shared/partially_closable_sockets'

platform_is_not :windows do
  describe "UNIXSocket partial closability" do

    before :each do
      @path = SocketSpecs.socket_path
      @server = UNIXServer.open(@path)
      @s1 = UNIXSocket.new(@path)
      @s2 = @server.accept
    end

    after :each do
      @server.close
      @s1.close
      @s2.close
      SocketSpecs.rm_socket @path
    end

    it_should_behave_like "partially closable sockets"

  end
end