Sha256: 5dc9afc77371d58c3d133c7ff5efc3216edf47d6bfb4f0810b23fdae2559e249

Contents?: true

Size: 724 Bytes

Versions: 19

Compression:

Stored size: 724 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 '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

19 entries across 19 versions & 1 rubygems

Version Path
rubygems-update-3.2.17 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.2.16 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.2.15 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.2.14 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.2.13 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.2.12 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.2.11 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.2.10 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.2.9 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.2.8 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.2.7 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.2.6 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.2.5 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.2.4 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.2.3 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.2.2 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.2.1 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.2.0 test/rubygems/test_remote_fetch_error.rb
rubygems-update-3.2.0.rc.2 test/rubygems/test_remote_fetch_error.rb