Sha256: 3e053051b9a912ce71493ca3d99b96ce771cdac390ec404291de72a5e476eb9e

Contents?: true

Size: 588 Bytes

Versions: 4

Compression:

Stored size: 588 Bytes

Contents

require File.expand_path('../../fixtures/classes', __FILE__)

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

    after :each do
      @client.close
      @server.close
      rm_r @path
    end

    it "returns the path of the socket if it's a server" do
      @server.path.should == @path
    end

    it "returns an empty string for path if it's a client" do
      @client.path.should == ""
    end
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rubysl-socket-1.0.1 spec/unixsocket/path_spec.rb
rubysl-socket-2.0.1 spec/unixsocket/path_spec.rb
rubysl-socket-1.0.0 spec/unixsocket/path_spec.rb
rubysl-socket-2.0.0 spec/unixsocket/path_spec.rb