diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-17 13:07:24 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-17 13:07:24 +0000 |
commit | 28ed3c0f801ce8dc39de957a4268461bda3bc382 (patch) | |
tree | 39e08fbb4857979388e84b45ab20f0d0e42f5aa3 /spec | |
parent | a48339c2c90d475bdd4c1bf94463bdf29ce989bc (diff) | |
download | ruby-28ed3c0f801ce8dc39de957a4268461bda3bc382.tar.gz |
Guard with a :pktinfo feature specs relying on PKTINFO
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec')
-rw-r--r-- | spec/ruby/library/socket/ancillarydata/cmsg_is_spec.rb | 6 | ||||
-rw-r--r-- | spec/ruby/library/socket/ancillarydata/ip_pktinfo_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/library/socket/spec_helper.rb | 1 |
3 files changed, 6 insertions, 3 deletions
diff --git a/spec/ruby/library/socket/ancillarydata/cmsg_is_spec.rb b/spec/ruby/library/socket/ancillarydata/cmsg_is_spec.rb index e423e0ef05..bf93cd977e 100644 --- a/spec/ruby/library/socket/ancillarydata/cmsg_is_spec.rb +++ b/spec/ruby/library/socket/ancillarydata/cmsg_is_spec.rb @@ -15,8 +15,10 @@ with_feature :ancillary_data do @data.cmsg_is?(:IP, :TTL).should == true end - it 'returns false when comparing with :IP and :PKTINFO' do - @data.cmsg_is?(:IP, :PKTINFO).should == false + with_feature :pktinfo do + it 'returns false when comparing with :IP and :PKTINFO' do + @data.cmsg_is?(:IP, :PKTINFO).should == false + end end it 'returns false when comparing with :SOCKET and :RIGHTS' do diff --git a/spec/ruby/library/socket/ancillarydata/ip_pktinfo_spec.rb b/spec/ruby/library/socket/ancillarydata/ip_pktinfo_spec.rb index aaf5b80a23..1bc92e3373 100644 --- a/spec/ruby/library/socket/ancillarydata/ip_pktinfo_spec.rb +++ b/spec/ruby/library/socket/ancillarydata/ip_pktinfo_spec.rb @@ -1,6 +1,6 @@ require_relative '../spec_helper' -with_feature :ancillary_data do +with_feature :ancillary_data, :pktinfo do describe 'Socket::AncillaryData.ip_pktinfo' do describe 'with a source address and index' do before do diff --git a/spec/ruby/library/socket/spec_helper.rb b/spec/ruby/library/socket/spec_helper.rb index 5a6dea7aa7..8976937ac7 100644 --- a/spec/ruby/library/socket/spec_helper.rb +++ b/spec/ruby/library/socket/spec_helper.rb @@ -9,6 +9,7 @@ MSpec.enable_feature :sock_packet if Socket.const_defined?(:SOCK_PACKET) MSpec.enable_feature :unix_socket unless PlatformGuard.windows? MSpec.enable_feature :udp_cork if Socket.const_defined?(:UDP_CORK) MSpec.enable_feature :tcp_cork if Socket.const_defined?(:TCP_CORK) +MSpec.enable_feature :pktinfo if Socket.const_defined?(:IP_PKTINFO) MSpec.enable_feature :ipv6_pktinfo if Socket.const_defined?(:IPV6_PKTINFO) MSpec.enable_feature :ip_mtu if Socket.const_defined?(:IP_MTU) MSpec.enable_feature :ipv6_nexthop if Socket.const_defined?(:IPV6_NEXTHOP) |