[rubygems/rubygems] Improve Gem::SpecFetcher tests.

https://github.com/rubygems/rubygems/commit/6e0456583b
This commit is contained in:
Ellen Marie Dash 2024-09-28 15:34:52 -04:00 committed by git
parent 5c18b63d00
commit 87212a5486

View File

@ -170,6 +170,7 @@ class TestGemSpecFetcher < Gem::TestCase
fetcher.spec "example", 1
fetcher.spec "an-example", 1
fetcher.spec "examp", 1
fetcher.spec "other-example", 1
end
suggestions = @sf.suggest_gems_from_name("examplw", :latest, 1)
@ -179,9 +180,10 @@ class TestGemSpecFetcher < Gem::TestCase
assert_equal ["an-example"], suggestions
suggestions = @sf.suggest_gems_from_name("xample")
assert suggestions.any? { ["examp"] }
assert suggestions.any? { ["example"] }
assert suggestions.any? { ["an-example"] }
assert_equal ["example"], suggestions
suggestions = @sf.suggest_gems_from_name("other-apple")
assert_equal ["other-example"], suggestions
end
def test_suggest_gems_from_name_prerelease