mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Some environments do not have IPv6 address of localhost in /etc/hosts
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
953b7a2056
commit
60012d130c
1 changed files with 2 additions and 2 deletions
|
@ -37,13 +37,13 @@ describe 'Addrinfo.getaddrinfo' do
|
||||||
|
|
||||||
guard -> { SocketSpecs.ipv6_available? } do
|
guard -> { SocketSpecs.ipv6_available? } do
|
||||||
it 'sets a custom protocol family of the Addrinfo instances' do
|
it 'sets a custom protocol family of the Addrinfo instances' do
|
||||||
array = Addrinfo.getaddrinfo('localhost', 80, Socket::PF_INET6)
|
array = Addrinfo.getaddrinfo('::1', 80, Socket::PF_INET6)
|
||||||
|
|
||||||
array[0].pfamily.should == Socket::PF_INET6
|
array[0].pfamily.should == Socket::PF_INET6
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'sets a corresponding address family based on a custom protocol family' do
|
it 'sets a corresponding address family based on a custom protocol family' do
|
||||||
array = Addrinfo.getaddrinfo('localhost', 80, Socket::PF_INET6)
|
array = Addrinfo.getaddrinfo('::1', 80, Socket::PF_INET6)
|
||||||
|
|
||||||
array[0].afamily.should == Socket::AF_INET6
|
array[0].afamily.should == Socket::AF_INET6
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue