ruby-changes:52250
From: eregon <ko1@a...>
Date: Sun, 19 Aug 2018 04:55:13 +0900 (JST)
Subject: [ruby-changes:52250] eregon:r64457 (trunk): Adapt spec to consider Solaris
eregon 2018-08-19 04:36:10 +0900 (Sun, 19 Aug 2018) New Revision: 64457 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64457 Log: Adapt spec to consider Solaris Modified files: trunk/spec/ruby/library/socket/addrinfo/getnameinfo_spec.rb Index: spec/ruby/library/socket/addrinfo/getnameinfo_spec.rb =================================================================== --- spec/ruby/library/socket/addrinfo/getnameinfo_spec.rb (revision 64456) +++ spec/ruby/library/socket/addrinfo/getnameinfo_spec.rb (revision 64457) @@ -8,17 +8,22 @@ describe 'Addrinfo#getnameinfo' do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/addrinfo/getnameinfo_spec.rb#L8 @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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/