Sha256: 14578325ee206a9b047ed0488f37132a1c089c9334f8290659c124b6e8e9e90f

Contents?: true

Size: 820 Bytes

Versions: 45

Compression:

Stored size: 820 Bytes

Contents

require File.expand_path('../spec_helper', __FILE__)
require 'tempfile'

describe Cool.io::UNIXServer, :env => :exclude_win do

  before :each do
    @tmp = Tempfile.new('coolio_unix_server_spec')
    expect(File.unlink(@tmp.path)).to eq(1)
    expect(File.exist?(@tmp.path)).to eq(false)
  end

  it "creates a new Cool.io::UNIXServer" do
    listener = Cool.io::UNIXListener.new(@tmp.path)
    listener.listen(24)
    expect(File.socket?(@tmp.path)).to eq(true)
  end

  it "builds off an existing ::UNIXServer" do
    unix_server = ::UNIXServer.new(@tmp.path)
    expect(File.socket?(@tmp.path)).to eq(true)
    listener = Cool.io::UNIXServer.new(unix_server, Coolio::UNIXSocket)
    listener.listen(24)
    expect(File.socket?(@tmp.path)).to eq(true)
    expect(listener.fileno).to eq(unix_server.fileno)
  end

end

Version data entries

45 entries across 45 versions & 6 rubygems

Version Path
cool.io-1.9.0 spec/unix_server_spec.rb
fluent-plugin-nuopenlineage-light-0.1.0 vendor/bundle/ruby/3.3.0/gems/cool.io-1.8.1/spec/unix_server_spec.rb
fluent-plugin-openlineage-light-0.1.4 vendor/bundle/ruby/3.3.0/gems/cool.io-1.8.1/spec/unix_server_spec.rb
fluent-plugin-openlineage-light-0.1.3 vendor/bundle/ruby/3.3.0/gems/cool.io-1.8.1/spec/unix_server_spec.rb
fluent-plugin-openlineage-0.1.0 vendor/bundle/ruby/3.3.0/gems/cool.io-1.8.1/spec/unix_server_spec.rb
cool.io-1.8.0 spec/unix_server_spec.rb
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/cool.io-1.7.1/spec/unix_server_spec.rb
cool.io-1.7.1-x86-mingw32 spec/unix_server_spec.rb
cool.io-1.7.1-x64-mingw32 spec/unix_server_spec.rb
cool.io-1.7.1 spec/unix_server_spec.rb
cool.io-1.7.0 spec/unix_server_spec.rb
cool.io-1.6.1 spec/unix_server_spec.rb
cool.io-1.6.0-x64-mingw32 spec/unix_server_spec.rb
cool.io-1.6.0-x86-mingw32 spec/unix_server_spec.rb
cool.io-1.6.0 spec/unix_server_spec.rb
cool.io-1.5.4-x64-mingw32 spec/unix_server_spec.rb
cool.io-1.5.4-x86-mingw32 spec/unix_server_spec.rb
cool.io-1.5.4 spec/unix_server_spec.rb
cool.io-1.5.3-x86-mingw32 spec/unix_server_spec.rb
cool.io-1.5.3-x64-mingw32 spec/unix_server_spec.rb