diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2020-05-30 01:45:46 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2020-05-30 01:52:38 +0900 |
commit | e73e504e2f2618453c75cc322fa4813ab9661c60 (patch) | |
tree | 097fb15f0656c08e669388a3b7f8568a9571df8d /spec/ruby/library | |
parent | 0d1f0cd9ccb8c4d237f1eba92254a2ab306ae231 (diff) |
spec: add wsl guard
WSL 2 is officially released. It uses Linux kernel, so almost all specs
for Linux work on WSL, except one: gethostbyaddr. I guess network
resolution in WSL is based on Windows, so the behavior seems a bit
different from normal Linux.
This change adds `platform_is_not :wsl` guard, and guards out the test
in question.
Diffstat (limited to 'spec/ruby/library')
-rw-r--r-- | spec/ruby/library/socket/socket/gethostbyaddr_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/ruby/library/socket/socket/gethostbyaddr_spec.rb b/spec/ruby/library/socket/socket/gethostbyaddr_spec.rb index 5d97341103..8bebeb0e21 100644 --- a/spec/ruby/library/socket/socket/gethostbyaddr_spec.rb +++ b/spec/ruby/library/socket/socket/gethostbyaddr_spec.rb @@ -113,7 +113,7 @@ describe 'Socket.gethostbyaddr' do Socket.gethostbyaddr(@addr, :INET6).should be_an_instance_of(Array) end - platform_is_not :windows do + platform_is_not :windows, :wsl do it 'raises SocketError when the address is not supported by the family' do -> { Socket.gethostbyaddr(@addr, :INET) }.should raise_error(SocketError) end |