mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[rubygems/rubygems] make pretty_print tests whitespace agnostic
23e9396d22
This commit is contained in:
parent
7e02410bf8
commit
36a98307aa
4 changed files with 4 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue