Sha256: ff2c1a730595444854103d5734398cd7c14566d51ae95f8bfdf1b1bb9ff7cecc

Contents?: true

Size: 725 Bytes

Versions: 10

Compression:

Stored size: 725 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

10 entries across 10 versions & 1 rubygems

Version Path
rubygems-update-3.0.9 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.0.8 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.0.7 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.0.6 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.0.5 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.0.4 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.0.3 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.0.2 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.0.1 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.0.0 test/rubygems/test_remote_fetch_error.rb