mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
getifaddrs_spec.rb: should
returned nil
on success
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
abfc5470c0
commit
df0517dbc0
1 changed files with 7 additions and 0 deletions
|
@ -50,6 +50,7 @@ describe 'Socket.getifaddrs' do
|
|||
it 'is an Addrinfo' do
|
||||
@addrs.all? do |addr|
|
||||
addr.should be_an_instance_of(Addrinfo)
|
||||
true
|
||||
end.should be_true
|
||||
end
|
||||
|
||||
|
@ -57,6 +58,7 @@ describe 'Socket.getifaddrs' do
|
|||
@addrs.all? do |addr|
|
||||
addr.afamily.should be_kind_of(Integer)
|
||||
addr.afamily.should_not == Socket::AF_UNSPEC
|
||||
true
|
||||
end.should be_true
|
||||
end
|
||||
end
|
||||
|
@ -70,6 +72,7 @@ describe 'Socket.getifaddrs' do
|
|||
it 'is an Addrinfo' do
|
||||
@addrs.all? do |addr|
|
||||
addr.should be_an_instance_of(Addrinfo)
|
||||
true
|
||||
end.should be_true
|
||||
end
|
||||
|
||||
|
@ -77,6 +80,7 @@ describe 'Socket.getifaddrs' do
|
|||
@addrs.all? do |addr|
|
||||
addr.afamily.should be_kind_of(Integer)
|
||||
addr.afamily.should_not == Socket::AF_UNSPEC
|
||||
true
|
||||
end.should be_true
|
||||
end
|
||||
end
|
||||
|
@ -89,6 +93,7 @@ describe 'Socket.getifaddrs' do
|
|||
it 'is an Addrinfo' do
|
||||
@addrs.all? do |addr|
|
||||
addr.should be_an_instance_of(Addrinfo)
|
||||
true
|
||||
end.should be_true
|
||||
end
|
||||
|
||||
|
@ -96,12 +101,14 @@ describe 'Socket.getifaddrs' do
|
|||
@addrs.all? do |addr|
|
||||
addr.afamily.should be_kind_of(Integer)
|
||||
addr.afamily.should_not == Socket::AF_UNSPEC
|
||||
true
|
||||
end.should be_true
|
||||
end
|
||||
|
||||
it 'has an IP address' do
|
||||
@addrs.all? do |addr|
|
||||
addr.ip_address.should be_an_instance_of(String)
|
||||
true
|
||||
end.should be_true
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue