Sha256: 8c22c9865a8040fb38a0debcf1cd930fd0f0ead33e90b11062eb17e9582ac8c7

Contents?: true

Size: 597 Bytes

Versions: 10

Compression:

Stored size: 597 Bytes

Contents

# frozen_string_literal: true
require 'rubygems/test_case'

class TestGemSourceFetchProblem < Gem::TestCase

  def test_exception
    source = Gem::Source.new @gem_repo
    error  = RuntimeError.new 'test'

    sf = Gem::SourceFetchProblem.new source, error

    e = assert_raises RuntimeError do
      raise sf
    end

    assert_equal 'test', e.message
  end

  def test_password_redacted
    source = Gem::Source.new 'https://username:secret@gemsource.com'
    error  = RuntimeError.new 'test'

    sf = Gem::SourceFetchProblem.new source, error

    refute_match sf.wordy, 'secret'
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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