[rubygems/rubygems] make pretty_print tests whitespace agnostic

23e9396d22
This commit is contained in:
Durable Programming Team 2024-11-29 11:03:01 -05:00 committed by git
parent 7e02410bf8
commit 36a98307aa
4 changed files with 4 additions and 6 deletions

View file

@ -293,9 +293,7 @@ class TestGemSourceGit < Gem::TestCase
end
def test_pretty_print
assert_equal "#<Gem::Source::Git[Git: \n" \
" #{@repository}\n" \
" HEAD]>\n", @source.pretty_inspect
assert_equal "#<Gem::Source::Git[Git: #{@repository} HEAD]>", @source.pretty_inspect.gsub(/\s+/, " ").strip
end
def test_uri_hash

View file

@ -35,6 +35,6 @@ class TestGemSourceInstalled < Gem::TestCase
def test_pretty_print
local = Gem::Source::Installed.new
assert_equal "#<Gem::Source::Installed[Installed]>\n", local.pretty_inspect
assert_equal "#<Gem::Source::Installed[Installed]>", local.pretty_inspect.gsub(/\s+/, " ").strip
end
end

View file

@ -107,6 +107,6 @@ class TestGemSourceLocal < Gem::TestCase
def test_pretty_print
local = Gem::Source::Local.new
assert_equal "#<Gem::Source::Local[Local gems: ]>\n", local.pretty_inspect
assert_equal "#<Gem::Source::Local[Local gems: ]>", local.pretty_inspect.gsub(/\s+/, " ").strip
end
end

View file

@ -75,6 +75,6 @@ class TestGemSourceSpecificFile < Gem::TestCase
end
def test_pretty_print
assert_equal "#<Gem::Source::SpecificFile[SpecificFile:\n #{@sf.path}]>\n", @sf.pretty_inspect
assert_equal "#<Gem::Source::SpecificFile[SpecificFile: #{@sf.path}]>", @sf.pretty_inspect.gsub(/\s+/, " ").strip
end
end