1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Remote test to check require

This test was triggering require of `rubygems/core_ext/tcpsocket_init`
which overrides TCPSocket.initialize globally. Requires don't get
reset between test runs and it was making other test unreliable.

Fixes timeout of test on ruby master

fdfe5c9691
This commit is contained in:
Aditya Prakash 2021-03-06 08:41:50 +05:30 committed by Hiroshi SHIBATA
parent 53468cc111
commit 7de349bb49
Notes: git 2021-03-08 13:47:56 +09:00

View file

@ -962,12 +962,6 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
end end
end end
def test_tcpsocketext_require
with_configured_fetcher(":ipv4_fallback_enabled: true") do |fetcher|
refute require('rubygems/core_ext/tcpsocket_init')
end
end
def with_configured_fetcher(config_str = nil, &block) def with_configured_fetcher(config_str = nil, &block)
if config_str if config_str
temp_conf = File.join @tempdir, '.gemrc' temp_conf = File.join @tempdir, '.gemrc'