From 5307d803f5cce7b14a6afd1d51f6d53ec85ca87d Mon Sep 17 00:00:00 2001 From: drbrain Date: Thu, 21 Nov 2013 23:27:30 +0000 Subject: * lib/rubygems: Update to RubyGems master 50a8210. Important changes in this commit: RubyGems now automatically checks for gem.deps.rb or Gemfile when running ruby executables. This behavior is similar to `bundle exec rake`. This change may be reverted before Ruby 2.1.0 if too many bugs are found. * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- .../test_gem_resolver_api_specification.rb | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'test/rubygems/test_gem_resolver_api_specification.rb') diff --git a/test/rubygems/test_gem_resolver_api_specification.rb b/test/rubygems/test_gem_resolver_api_specification.rb index e61d30c7c6..4a94135f06 100644 --- a/test/rubygems/test_gem_resolver_api_specification.rb +++ b/test/rubygems/test_gem_resolver_api_specification.rb @@ -28,5 +28,41 @@ class TestGemResolverAPISpecification < Gem::TestCase assert_equal expected, spec.dependencies end + def test_source + set = Gem::Resolver::APISet.new + data = { + :name => 'a', + :number => '1', + :platform => 'ruby', + :dependencies => [], + } + + api_spec = Gem::Resolver::APISpecification.new set, data + + assert_equal set.source, api_spec.source + end + + def test_spec + spec_fetcher do |fetcher| + fetcher.spec 'a', 1 + end + + dep_uri = URI(@gem_repo) + 'api/v1/dependencies' + set = Gem::Resolver::APISet.new dep_uri + data = { + :name => 'a', + :number => '1', + :platform => 'ruby', + :dependencies => [], + } + + api_spec = Gem::Resolver::APISpecification.new set, data + + spec = api_spec.spec + + assert_kind_of Gem::Specification, spec + assert_equal 'a-1', spec.full_name + end + end -- cgit v1.2.3