summaryrefslogtreecommitdiff
path: root/spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb')
-rw-r--r--spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb24
1 files changed, 10 insertions, 14 deletions
diff --git a/spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb b/spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb
index 67fad73815..47393ee167 100644
--- a/spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb
+++ b/spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb
@@ -5,8 +5,8 @@ describe 'Addrinfo.getaddrinfo' do
it 'returns an Array of Addrinfo instances' do
array = Addrinfo.getaddrinfo('127.0.0.1', 80)
- array.should be_an_instance_of(Array)
- array[0].should be_an_instance_of(Addrinfo)
+ array.should.instance_of?(Array)
+ array[0].should.instance_of?(Addrinfo)
end
SocketSpecs.each_ip_protocol do |family, ip_address|
@@ -54,7 +54,7 @@ describe 'Addrinfo.getaddrinfo' do
array = Addrinfo.getaddrinfo('127.0.0.1', 80)
possible = [Socket::SOCK_STREAM, Socket::SOCK_DGRAM]
- possible.should include(array[0].socktype)
+ possible.should.include?(array[0].socktype)
end
end
@@ -69,23 +69,19 @@ describe 'Addrinfo.getaddrinfo' do
array = Addrinfo.getaddrinfo('127.0.0.1', 80)
possible = [Socket::IPPROTO_TCP, Socket::IPPROTO_UDP]
- possible.should include(array[0].protocol)
+ possible.should.include?(array[0].protocol)
end
end
- platform_is_not :'solaris2.10' do # i386-solaris
- it 'sets a custom socket protocol of the Addrinfo instances' do
- array = Addrinfo.getaddrinfo('127.0.0.1', 80, nil, nil, Socket::IPPROTO_UDP)
+ it 'sets a custom socket protocol of the Addrinfo instances' do
+ array = Addrinfo.getaddrinfo('127.0.0.1', 80, nil, nil, Socket::IPPROTO_UDP)
- array[0].protocol.should == Socket::IPPROTO_UDP
- end
+ array[0].protocol.should == Socket::IPPROTO_UDP
end
- platform_is_not :solaris do
- it 'sets the canonical name when AI_CANONNAME is given as a flag' do
- array = Addrinfo.getaddrinfo('localhost', 80, nil, nil, nil, Socket::AI_CANONNAME)
+ it 'sets the canonical name when AI_CANONNAME is given as a flag' do
+ array = Addrinfo.getaddrinfo('localhost', 80, nil, nil, nil, Socket::AI_CANONNAME)
- array[0].canonname.should be_an_instance_of(String)
- end
+ array[0].canonname.should.instance_of?(String)
end
end