Sha256: c29553b524d20149187c836a6f6bb50d66726e1774c111c789bd134db00740eb

Contents?: true

Size: 723 Bytes

Versions: 29

Compression:

Stored size: 723 Bytes

Contents

# frozen_string_literal: true
require_relative 'helper'

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 %r{secret}, error.to_s
  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

29 entries across 29 versions & 1 rubygems

Version Path
rubygems-update-3.2.34 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.3.18 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.3.17 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.3.16 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.3.15 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.3.14 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.3.13 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.3.12 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.3.11 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.3.10 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.3.9 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.3.8 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.3.7 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.3.6 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.3.5 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.3.4 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.3.3 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.3.2 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.3.1 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.3.0 test/rubygems/test_remote_fetch_error.rb