Sha256: 2fedcd85af1a77abeb8a247bb85edb34cf685d04eeee070a41fc0c5bcf7d7430

Contents?: true

Size: 596 Bytes

Versions: 19

Compression:

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

19 entries across 19 versions & 1 rubygems

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