Sha256: 04d364c1bfa819ff3f4036d310b49715c580cc3646f475478b55935147f4288f
Contents?: true
Size: 790 Bytes
Versions: 2
Compression:
Stored size: 790 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') 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) listener.listen(24) 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, Coolio::UNIXSocket) listener.listen(24) File.socket?(@tmp.path).should == true listener.fileno.should == unix_server.fileno end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cool.io-1.3.0 | spec/unix_server_spec.rb |
cool.io-1.2.4 | spec/unix_server_spec.rb |