summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_commands_sources_command.rb
diff options
context:
space:
mode:
authorDaniel Niknam <[email protected]>2021-08-22 01:40:21 +1000
committerHiroshi SHIBATA <[email protected]>2021-08-31 19:06:14 +0900
commit3adc141a79cdab83671b7f68301901dd7726e7c4 (patch)
treef54b06d49939b7fe03358acdca0f5b178a583a12 /test/rubygems/test_gem_commands_sources_command.rb
parent19e1d3cdce96b9e58a0947b6fcbabd6da06cbd11 (diff)
[rubygems/rubygems] Refactor `Gem::RemoteFetcher::FetchError` initializer to `build` method
The `initialize` method is already doing a lot and by adding the `Gem::PrintableUri` to redact sensitive information, things are getting complicated and hard to read here. For the start, I have refactored the `initialize` method into a class method called `build`. https://github.com/rubygems/rubygems/commit/4312e8fdf5
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4789
Diffstat (limited to 'test/rubygems/test_gem_commands_sources_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_sources_command.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/rubygems/test_gem_commands_sources_command.rb b/test/rubygems/test_gem_commands_sources_command.rb
index 7bca0f3803..6fcbbf657b 100644
--- a/test/rubygems/test_gem_commands_sources_command.rb
+++ b/test/rubygems/test_gem_commands_sources_command.rb
@@ -182,7 +182,7 @@ class TestGemCommandsSourcesCommand < Gem::TestCase
uri = "http://beta-gems.example.com/specs.#{@marshal_version}.gz"
@fetcher.data[uri] = proc do
- raise Gem::RemoteFetcher::FetchError.new('it died', uri)
+ raise Gem::RemoteFetcher::FetchError.build('it died', uri)
end
@cmd.handle_options %w[--add http://beta-gems.example.com]