diff options
Diffstat (limited to 'spec/rubyspec')
-rw-r--r-- | spec/rubyspec/library/socket/tcpsocket/shared/new.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/rubyspec/library/socket/tcpsocket/shared/new.rb b/spec/rubyspec/library/socket/tcpsocket/shared/new.rb index f745a69f67..d172456923 100644 --- a/spec/rubyspec/library/socket/tcpsocket/shared/new.rb +++ b/spec/rubyspec/library/socket/tcpsocket/shared/new.rb @@ -9,7 +9,9 @@ describe :tcpsocket_new, shared: true do it "refuses the connection when there is no server to connect to" do lambda do TCPSocket.send(@method, SocketSpecs.hostname, SocketSpecs.reserved_unused_port) - end.should raise_error([Errno::ECONNREFUSED, Errno::EADDRNOTAVAIL]) + end.should raise_error(SystemCallError) {|e| + [Errno::ECONNREFUSED, Errno::EADDRNOTAVAIL].should include(e.class) + } end describe "with a running server" do |