Sha256: 5544bb74cb077b71667d04c54c9735f26d1aa115d237ec15a34d11653d193bb9

Contents?: true

Size: 726 Bytes

Versions: 25

Compression:

Stored size: 726 Bytes

Contents

# frozen_string_literal: true
require 'rubygems/test_case'

class TestRemoteFetchError < Gem::TestCase

  def test_password_redacted
    error = Gem::RemoteFetcher::FetchError.new('There was an error fetching', 'https://user:secret@gemsource.org')
    refute_match error.to_s, 'secret'
  end

  def test_invalid_url
    error = Gem::RemoteFetcher::FetchError.new('There was an error fetching', 'https://::gemsource.org')
    assert_equal error.to_s, 'There was an error fetching (https://::gemsource.org)'
  end

  def test_to_s
    error = Gem::RemoteFetcher::FetchError.new('There was an error fetching', 'https://gemsource.org')
    assert_equal error.to_s, 'There was an error fetching (https://gemsource.org)'
  end
end

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
rubygems-update-2.6.8 test/rubygems/test_remote_fetch_error.rb
rubygems-update-2.6.7 test/rubygems/test_remote_fetch_error.rb
rubygems-update-2.6.6 test/rubygems/test_remote_fetch_error.rb
rubygems-update-2.6.5 test/rubygems/test_remote_fetch_error.rb
rubygems-update-2.6.4 test/rubygems/test_remote_fetch_error.rb