mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Guard a few specs which ipv6_available?
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c46515e42a
commit
a140f157b9
3 changed files with 73 additions and 67 deletions
|
@ -1,6 +1,7 @@
|
|||
require_relative '../spec_helper'
|
||||
|
||||
describe 'Addrinfo#ipv6_linklocal?' do
|
||||
guard -> { SocketSpecs.ipv6_available? } do
|
||||
describe 'Addrinfo#ipv6_linklocal?' do
|
||||
it 'returns true for a link-local address' do
|
||||
Addrinfo.ip('fe80::').ipv6_linklocal?.should == true
|
||||
Addrinfo.ip('fe81::').ipv6_linklocal?.should == true
|
||||
|
@ -15,4 +16,5 @@ describe 'Addrinfo#ipv6_linklocal?' do
|
|||
it 'returns false for an IPv4 address' do
|
||||
Addrinfo.ip('127.0.0.1').ipv6_linklocal?.should == false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
require_relative '../spec_helper'
|
||||
|
||||
describe 'Addrinfo#ipv6_sitelocal?' do
|
||||
guard -> { SocketSpecs.ipv6_available? } do
|
||||
describe 'Addrinfo#ipv6_sitelocal?' do
|
||||
it 'returns true for a site-local address' do
|
||||
Addrinfo.ip('feef::').ipv6_sitelocal?.should == true
|
||||
Addrinfo.ip('fee0::').ipv6_sitelocal?.should == true
|
||||
|
@ -15,4 +16,5 @@ describe 'Addrinfo#ipv6_sitelocal?' do
|
|||
it 'returns false for an IPv4 address' do
|
||||
Addrinfo.ip('127.0.0.1').ipv6_sitelocal?.should == false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
require_relative '../spec_helper'
|
||||
|
||||
describe 'Addrinfo#ipv6_to_ipv4' do
|
||||
guard -> { SocketSpecs.ipv6_available? } do
|
||||
describe 'Addrinfo#ipv6_to_ipv4' do
|
||||
it 'returns an Addrinfo for ::192.168.1.1' do
|
||||
addr = Addrinfo.ip('::192.168.1.1').ipv6_to_ipv4
|
||||
|
||||
|
@ -63,4 +64,5 @@ describe 'Addrinfo#ipv6_to_ipv4' do
|
|||
Addrinfo.unix('foo').ipv6_to_ipv4.should be_nil
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue