зеркало из https://github.com/github/ruby.git
[ruby/openssl] test/openssl/test_ssl: use assert_raise in test_bad_socket
The Ruby tree disallows assert_raises. https://github.com/ruby/openssl/commit/9b4f761e74
This commit is contained in:
Родитель
35b9d8d393
Коммит
cda8bc3657
|
@ -6,7 +6,7 @@ if defined?(OpenSSL)
|
|||
class OpenSSL::TestSSL < OpenSSL::SSLTestCase
|
||||
def test_bad_socket
|
||||
bad_socket = Struct.new(:sync).new
|
||||
assert_raises TypeError do
|
||||
assert_raise TypeError do
|
||||
socket = OpenSSL::SSL::SSLSocket.new bad_socket
|
||||
# if the socket is not a T_FILE, `connect` will segv because it tries
|
||||
# to get the underlying file descriptor but the API it calls assumes
|
||||
|
|
Загрузка…
Ссылка в новой задаче