1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/rubygems/test_gem_dependency_resolver_installer_set.rb

29 lines
668 B
Ruby
Raw Normal View History

require 'rubygems/test_case'
require 'rubygems/dependency_resolver'
class TestGemDependencyResolverInstallerSet < Gem::TestCase
def test_load_spec
@fetcher = Gem::FakeFetcher.new
Gem::RemoteFetcher.fetcher = @fetcher
a_2 = quick_spec 'a', 2
a_2_p = quick_spec 'a', 2 do |s| s.platform = Gem::Platform.local end
Gem::Specification.add_specs a_2, a_2_p
util_setup_spec_fetcher a_2, a_2_p
source = Gem::Source.new @gem_repo
version = v 2
set = Gem::DependencyResolver::InstallerSet.new :remote
spec = set.load_spec 'a', version, Gem::Platform.local, source
assert_equal a_2_p.full_name, spec.full_name
end
end