1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Adapt spec to consider Solaris

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eregon 2018-08-18 19:36:10 +00:00
parent 08563f2e14
commit 946c080892

View file

@ -8,17 +8,22 @@ describe 'Addrinfo#getnameinfo' do
@addr = Addrinfo.tcp(ip_address, 80)
end
it 'returns the node and service names' do
host, service = @addr.getnameinfo
platform_is_not :solaris do
it 'returns the node and service names' do
host, service = @addr.getnameinfo
service.should == 'http'
end
end
host.should be_an_instance_of(String)
service.should == 'http'
platform_is :solaris do
it 'returns the node and service names' do
host, service = @addr.getnameinfo
service.should == '80'
end
end
it 'accepts flags as a Fixnum as the first argument' do
host, service = @addr.getnameinfo(Socket::NI_NUMERICSERV)
host.should be_an_instance_of(String)
service.should == '80'
end
end