aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/library/socket/tcpserver
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-25 10:41:16 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-25 10:41:16 +0000
commite87fb88be844f0fae736768846954b6f6f7dc7c3 (patch)
treecbe2ab069e40b5b7f3217ce95b793426b303a305 /spec/ruby/library/socket/tcpserver
parente59bf54b3a88d0465cca021afae7dc05b6db57a7 (diff)
downloadruby-e87fb88be844f0fae736768846954b6f6f7dc7c3.tar.gz
Update to ruby/spec@241f9e7
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/library/socket/tcpserver')
-rw-r--r--spec/ruby/library/socket/tcpserver/initialize_spec.rb12
-rw-r--r--spec/ruby/library/socket/tcpserver/listen_spec.rb2
-rw-r--r--spec/ruby/library/socket/tcpserver/new_spec.rb10
-rw-r--r--spec/ruby/library/socket/tcpserver/sysaccept_spec.rb6
4 files changed, 15 insertions, 15 deletions
diff --git a/spec/ruby/library/socket/tcpserver/initialize_spec.rb b/spec/ruby/library/socket/tcpserver/initialize_spec.rb
index 9a55cf17e2..412bdbfb9d 100644
--- a/spec/ruby/library/socket/tcpserver/initialize_spec.rb
+++ b/spec/ruby/library/socket/tcpserver/initialize_spec.rb
@@ -2,7 +2,7 @@ require_relative '../spec_helper'
require_relative '../fixtures/classes'
describe 'TCPServer#initialize' do
- describe 'with a single Fixnum argument' do
+ describe 'with a single Integer argument' do
before do
@server = TCPServer.new(0)
end
@@ -12,7 +12,7 @@ describe 'TCPServer#initialize' do
end
it 'sets the port to the given argument' do
- @server.local_address.ip_port.should be_an_instance_of(Fixnum)
+ @server.local_address.ip_port.should be_kind_of(Integer)
@server.local_address.ip_port.should > 0
end
@@ -38,7 +38,7 @@ describe 'TCPServer#initialize' do
end
it 'sets the port to the given argument' do
- @server.local_address.ip_port.should be_an_instance_of(Fixnum)
+ @server.local_address.ip_port.should be_kind_of(Integer)
@server.local_address.ip_port.should > 0
end
@@ -56,7 +56,7 @@ describe 'TCPServer#initialize' do
end
end
- describe 'with a String and a Fixnum' do
+ describe 'with a String and an Integer' do
SocketSpecs.each_ip_protocol do |family, ip_address|
before do
@server = TCPServer.new(ip_address, 0)
@@ -67,7 +67,7 @@ describe 'TCPServer#initialize' do
end
it 'sets the port to the given port argument' do
- @server.local_address.ip_port.should be_an_instance_of(Fixnum)
+ @server.local_address.ip_port.should be_kind_of(Integer)
@server.local_address.ip_port.should > 0
end
@@ -90,7 +90,7 @@ describe 'TCPServer#initialize' do
end
it 'sets the port to the given port argument' do
- @server.local_address.ip_port.should be_an_instance_of(Fixnum)
+ @server.local_address.ip_port.should be_kind_of(Integer)
@server.local_address.ip_port.should > 0
end
diff --git a/spec/ruby/library/socket/tcpserver/listen_spec.rb b/spec/ruby/library/socket/tcpserver/listen_spec.rb
index 1e17de06f1..e266decd61 100644
--- a/spec/ruby/library/socket/tcpserver/listen_spec.rb
+++ b/spec/ruby/library/socket/tcpserver/listen_spec.rb
@@ -15,7 +15,7 @@ describe 'TCPServer#listen' do
@server.listen(1).should == 0
end
- it "raises when the given argument can't be coerced to a Fixnum" do
+ it "raises when the given argument can't be coerced to an Integer" do
lambda { @server.listen('cats') }.should raise_error(TypeError)
end
end
diff --git a/spec/ruby/library/socket/tcpserver/new_spec.rb b/spec/ruby/library/socket/tcpserver/new_spec.rb
index 94033411e3..4717b95a2c 100644
--- a/spec/ruby/library/socket/tcpserver/new_spec.rb
+++ b/spec/ruby/library/socket/tcpserver/new_spec.rb
@@ -10,7 +10,7 @@ describe "TCPServer.new" do
@server = TCPServer.new('127.0.0.1', 0)
addr = @server.addr
addr[0].should == 'AF_INET'
- addr[1].should be_kind_of(Fixnum)
+ addr[1].should be_kind_of(Integer)
# on some platforms (Mac), MRI
# returns comma at the end.
addr[2].should =~ /^#{SocketSpecs.hostname}\b/
@@ -20,7 +20,7 @@ describe "TCPServer.new" do
it "binds to localhost and a port with either IPv4 or IPv6" do
@server = TCPServer.new(SocketSpecs.hostname, 0)
addr = @server.addr
- addr[1].should be_kind_of(Fixnum)
+ addr[1].should be_kind_of(Integer)
if addr[0] == 'AF_INET'
addr[2].should =~ /^#{SocketSpecs.hostname}\b/
addr[3].should == '127.0.0.1'
@@ -34,7 +34,7 @@ describe "TCPServer.new" do
@server = TCPServer.new('', 0)
addr = @server.addr
addr[0].should == 'AF_INET'
- addr[1].should be_kind_of(Fixnum)
+ addr[1].should be_kind_of(Integer)
addr[2].should == '0.0.0.0'
addr[3].should == '0.0.0.0'
end
@@ -43,7 +43,7 @@ describe "TCPServer.new" do
@server = TCPServer.new('', 0)
addr = @server.addr
addr[0].should == 'AF_INET'
- addr[1].should be_kind_of(Fixnum)
+ addr[1].should be_kind_of(Integer)
addr[2].should == '0.0.0.0'
addr[3].should == '0.0.0.0'
end
@@ -56,7 +56,7 @@ describe "TCPServer.new" do
@server = TCPServer.new(SocketSpecs.hostname, port)
addr = @server.addr
- addr[1].should be_kind_of(Fixnum)
+ addr[1].should be_kind_of(Integer)
# TODO: This should also accept strings like 'https', but I don't know how to
# pick such a service port that will be able to reliably bind...
diff --git a/spec/ruby/library/socket/tcpserver/sysaccept_spec.rb b/spec/ruby/library/socket/tcpserver/sysaccept_spec.rb
index 144b6806f1..5543b67755 100644
--- a/spec/ruby/library/socket/tcpserver/sysaccept_spec.rb
+++ b/spec/ruby/library/socket/tcpserver/sysaccept_spec.rb
@@ -21,7 +21,7 @@ describe "TCPServer#sysaccept" do
fd = @server.sysaccept
- fd.should be_an_instance_of(Fixnum)
+ fd.should be_kind_of(Integer)
ensure
sock.close if sock && !sock.closed?
IO.for_fd(fd).close if fd
@@ -55,10 +55,10 @@ describe 'TCPServer#sysaccept' do
@client.close
end
- it 'returns a new file descriptor as a Fixnum' do
+ it 'returns a new file descriptor as an Integer' do
@fd = @server.sysaccept
- @fd.should be_an_instance_of(Fixnum)
+ @fd.should be_kind_of(Integer)
@fd.should_not == @client.fileno
end
end