Skip to content

Commit caab311

Browse files
committed
Disable other unimplemented methods
1 parent 44bacc4 commit caab311

File tree

6 files changed

+15
-12
lines changed

6 files changed

+15
-12
lines changed

library/socket/basicsocket/getpeereid_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
require_relative '../fixtures/classes'
33

44
describe '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

library/socket/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
MSpec.enable_feature :sock_packet if Socket.const_defined?(:SOCK_PACKET)
55
MSpec.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?
77
MSpec.enable_feature :udp_cork if Socket.const_defined?(:UDP_CORK)
88
MSpec.enable_feature :tcp_cork if Socket.const_defined?(:TCP_CORK)
99
MSpec.enable_feature :pktinfo if Socket.const_defined?(:IP_PKTINFO)

library/socket/unixserver/accept_spec.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,12 @@
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

library/socket/unixsocket/initialize_spec.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,16 @@
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
4849
end

library/socket/unixsocket/recv_io_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require_relative '../spec_helper'
22
require_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

library/socket/unixsocket/send_io_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require_relative '../spec_helper'
22
require_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

0 commit comments

Comments
 (0)