diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-23 14:58:08 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-23 14:58:08 +0000 |
commit | 833ca7bd4fbe9d3b2fc6aa2ce1238a1479d85841 (patch) | |
tree | 46ddc7742ff8ca4f689ad20666d41c6a1018dc68 | |
parent | a740fa1b2518fcfe1b8be4da86eca34fbd5f7fe5 (diff) | |
download | ruby-833ca7bd4fbe9d3b2fc6aa2ce1238a1479d85841.tar.gz |
getifaddrs_spec.rb: allow no address
* spec/ruby/library/socket/socket/getifaddrs_spec.rb: allow no
address for platform dependent failures.
https://travis-ci.org/ruby/ruby/jobs/445126982#L2234-L2244
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | spec/ruby/library/socket/socket/getifaddrs_spec.rb | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/spec/ruby/library/socket/socket/getifaddrs_spec.rb b/spec/ruby/library/socket/socket/getifaddrs_spec.rb index ad23499ef9..522c2ff4aa 100644 --- a/spec/ruby/library/socket/socket/getifaddrs_spec.rb +++ b/spec/ruby/library/socket/socket/getifaddrs_spec.rb @@ -48,16 +48,16 @@ describe 'Socket.getifaddrs' do end it 'is an Addrinfo' do - @addrs.each do |addr| + @addrs.all? do |addr| addr.should be_an_instance_of(Addrinfo) - end + end.should be_true end it 'has an address family' do - @addrs.each do |addr| + @addrs.all? do |addr| addr.afamily.should be_kind_of(Integer) addr.afamily.should_not == Socket::AF_UNSPEC - end + end.should be_true end end @@ -68,16 +68,16 @@ describe 'Socket.getifaddrs' do end it 'is an Addrinfo' do - @addrs.each do |addr| + @addrs.all? do |addr| addr.should be_an_instance_of(Addrinfo) - end + end.should be_true end it 'has an address family' do - @addrs.each do |addr| + @addrs.all? do |addr| addr.afamily.should be_kind_of(Integer) addr.afamily.should_not == Socket::AF_UNSPEC - end + end.should be_true end end @@ -87,22 +87,22 @@ describe 'Socket.getifaddrs' do end it 'is an Addrinfo' do - @addrs.each do |addr| + @addrs.all? do |addr| addr.should be_an_instance_of(Addrinfo) - end + end.should be_true end it 'has an address family' do - @addrs.each do |addr| + @addrs.all? do |addr| addr.afamily.should be_kind_of(Integer) addr.afamily.should_not == Socket::AF_UNSPEC - end + end.should be_true end it 'has an IP address' do - @addrs.each do |addr| + @addrs.all? do |addr| addr.ip_address.should be_an_instance_of(String) - end + end.should be_true end end end |