Skip to content

Commit

Permalink
Add test_fetch_path_socket_error
Browse files Browse the repository at this point in the history
  • Loading branch information
bronzdoc committed Jan 28, 2020
1 parent c05d543 commit f144644
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/rubygems/test_gem_remote_fetcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def test_fetch_path_bad_uri
assert_equal 'uri scheme is invalid: nil', e.message
end

def test_fetch_size_socket_error
def test_fetch_path_socket_error
fetcher = Gem::RemoteFetcher.new nil
@fetcher = fetcher
def fetcher.request(uri, request_class, last_modified = nil)
Expand All @@ -173,9 +173,7 @@ def fetcher.request(uri, request_class, last_modified = nil)

uri = 'http://gems.example.com/yaml'
e = assert_raises Gem::RemoteFetcher::FetchError do
Gem::Deprecate.skip_during do
fetcher.fetch_size uri
end
@fetcher.fetch_path(uri, nil, true)
end

assert_equal "SocketError: oops (#{uri})", e.message
Expand Down

0 comments on commit f144644

Please sign in to comment.