1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/spec/ruby/library/socket/socket/ipv6only_bang_spec.rb
nobu 5f9f9013da Add missing require
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-13 09:59:23 +00:00

20 lines
398 B
Ruby

require_relative '../spec_helper'
require_relative '../fixtures/classes'
guard -> { SocketSpecs.ipv6_available? } do
describe 'Socket#ipv6only!' do
before do
@socket = Socket.new(:INET6, :DGRAM)
end
after do
@socket.close
end
it 'enables IPv6 only mode' do
@socket.ipv6only!
@socket.getsockopt(:IPV6, :V6ONLY).bool.should == true
end
end
end