We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 079ad49 commit 22a5c3aCopy full SHA for 22a5c3a
library/socket/tcpsocket/initialize_spec.rb
@@ -7,6 +7,12 @@
7
it 'raises Errno::ECONNREFUSED' do
8
-> { TCPSocket.new(ip_address, 666) }.should raise_error(Errno::ECONNREFUSED)
9
end
10
+
11
+ it 'raises Errno::ETIMEDOUT with :connect_timeout' do
12
+ -> {
13
+ TCPSocket.new("192.0.2.1", 80, connect_timeout: 0)
14
+ }.should raise_error(Errno::ETIMEDOUT)
15
+ end
16
17
18
describe 'when a server is listening on the given address' do
@@ -56,14 +62,6 @@
56
62
@client.local_address.ip_port.should_not == @port
57
63
58
64
59
-
60
- describe 'when server connection is timeout' do
61
- ruby_version_is "3.0" do
- it 'raises Errno::ETIMEDOUT' do
- -> { TCPSocket.new(ip_address, @port, connect_timeout: 0) }.should raise_error(Errno::ETIMEDOUT)
- end
65
66
67
68
69
0 commit comments