[rubygems/rubygems] Improve Gem::SpecFetcher tests.
https://github.com/rubygems/rubygems/commit/6e0456583b
This commit is contained in:
parent
5c18b63d00
commit
87212a5486
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user