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.7.11 test/rubygems/test_remote_fetch_error.rb
rubygems-update-2.7.10 test/rubygems/test_remote_fetch_error.rb
rubygems-update-2.7.9 test/rubygems/test_remote_fetch_error.rb
rubygems-update-2.7.8 test/rubygems/test_remote_fetch_error.rb
rubygems-update-2.7.7 test/rubygems/test_remote_fetch_error.rb
rubygems-update-2.7.6 test/rubygems/test_remote_fetch_error.rb
rubygems-update-2.7.5 test/rubygems/test_remote_fetch_error.rb
rubygems-update-2.7.4 test/rubygems/test_remote_fetch_error.rb
rubygems-update-2.7.4.pre1 test/rubygems/test_remote_fetch_error.rb
rubygems-update-2.7.3 test/rubygems/test_remote_fetch_error.rb
rubygems-update-2.7.2 test/rubygems/test_remote_fetch_error.rb
rubygems-update-2.7.1 test/rubygems/test_remote_fetch_error.rb
rubygems-update-2.7.0 test/rubygems/test_remote_fetch_error.rb
rubygems-update-2.6.14 test/rubygems/test_remote_fetch_error.rb
rubygems-update-2.6.13 test/rubygems/test_remote_fetch_error.rb
rubygems-update-2.6.12 test/rubygems/test_remote_fetch_error.rb
rubygems-update-2.6.11 test/rubygems/test_remote_fetch_error.rb
rubygems-update-2.6.10 test/rubygems/test_remote_fetch_error.rb
rubygems-update-2.6.9 test/rubygems/test_remote_fetch_error.rb
ruby-compiler-0.1.1 vendor/ruby/test/rubygems/test_remote_fetch_error.rb