Sha256: c29bf4d7759855cad7788220473a280b394237d3ebd39ebb2af1b6b78f14c1f8

Contents?: true

Size: 714 Bytes

Versions: 3

Compression:

Stored size: 714 Bytes

Contents

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

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

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

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

  it "builds off an existing ::UNIXServer" do
    unix_server = ::UNIXServer.new(@tmp.path)
    File.socket?(@tmp.path).should == true
    listener = Cool.io::UNIXServer.new(unix_server)
    File.socket?(@tmp.path).should == true
    listener.fileno.should == unix_server.fileno
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cool.io-1.2.0-x86-mswin32-60 spec/unix_server_spec.rb
cool.io-1.2.0-x86-mingw32 spec/unix_server_spec.rb
cool.io-1.2.0 spec/unix_server_spec.rb