File tree Expand file tree Collapse file tree 6 files changed +15
-12
lines changed
Expand file tree Collapse file tree 6 files changed +15
-12
lines changed Original file line number Diff line number Diff line change 22require_relative '../fixtures/classes'
33
44describe 'BasicSocket#getpeereid' do
5- with_feature :unix_socket do
5+ with_feature :unix_socket_full do
66 describe 'using a UNIXSocket' do
77 before do
88 @path = SocketSpecs . socket_path
Original file line number Diff line number Diff line change 33
44MSpec . enable_feature :sock_packet if Socket . const_defined? ( :SOCK_PACKET )
55MSpec . enable_feature :unix_socket if Socket . const_defined? ( :AF_UNIX )
6- MSpec . enable_feature :unix_socket_advanced unless PlatformGuard . windows?
6+ MSpec . enable_feature :unix_socket_full if Socket . const_defined? ( :AF_UNIX ) && ! PlatformGuard . windows?
77MSpec . enable_feature :udp_cork if Socket . const_defined? ( :UDP_CORK )
88MSpec . enable_feature :tcp_cork if Socket . const_defined? ( :TCP_CORK )
99MSpec . enable_feature :pktinfo if Socket . const_defined? ( :IP_PKTINFO )
Original file line number Diff line number Diff line change 111111 @socket . recv ( 5 ) . should == 'hello'
112112 end
113113
114- it "is set to nonblocking" do
115- require 'io/nonblock'
116- @socket = @server . accept
117- @socket . should . nonblock?
114+ with_feature :unix_socket_full do
115+ it "is set to nonblocking" do
116+ require 'io/nonblock'
117+ @socket = @server . accept
118+ @socket . should . nonblock?
119+ end
118120 end
119121
120122 it "is set to close on exec" do
Original file line number Diff line number Diff line change 3434 @socket . binmode? . should be_true
3535 end
3636
37- it 'sets the socket to nonblock' do
38- require 'io/nonblock'
39- @socket . should . nonblock?
37+ with_feature :unix_socket_full do
38+ it 'sets the socket to nonblock' do
39+ require 'io/nonblock'
40+ @socket . should . nonblock?
41+ end
4042 end
4143
4244 it 'sets the socket to close on exec' do
4345 @socket . should . close_on_exec?
4446 end
45-
4647 end
4748 end
4849end
Original file line number Diff line number Diff line change 11require_relative '../spec_helper'
22require_relative '../fixtures/classes'
33
4- with_feature :unix_socket_advanced do
4+ with_feature :unix_socket_full do
55 describe "UNIXSocket#recv_io" do
66 before :each do
77 @path = SocketSpecs . socket_path
Original file line number Diff line number Diff line change 11require_relative '../spec_helper'
22require_relative '../fixtures/classes'
33
4- with_feature :unix_socket_advanced do
4+ with_feature :unix_socket_full do
55 describe "UNIXSocket#send_io" do
66 before :each do
77 @path = SocketSpecs . socket_path
You can’t perform that action at this time.
0 commit comments