aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_specification.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-25 00:53:19 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-25 00:53:19 +0000
commit8eb39185810a59ad8d3aa874ba8f6c9a7b0949ac (patch)
tree790b26abda56b06c1d25a7a0036d882c32df7609 /test/rubygems/test_gem_specification.rb
parent61f3a787f6f12c794299871d5739cfdfa01ec617 (diff)
downloadruby-8eb39185810a59ad8d3aa874ba8f6c9a7b0949ac.tar.gz
* lib/rubygems: Fix CVE-2013-4363. Miscellaneous minor improvements.
* test/rubygems: Tests for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_specification.rb')
-rw-r--r--test/rubygems/test_gem_specification.rb20
1 files changed, 17 insertions, 3 deletions
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb
index 51c7be813f..2e2074fb29 100644
--- a/test/rubygems/test_gem_specification.rb
+++ b/test/rubygems/test_gem_specification.rb
@@ -1112,6 +1112,20 @@ dependencies: []
assert_equal [@bonobo, @monkey], @gem.dependencies
end
+ def test_dependent_gems
+ util_setup_deps
+
+ assert_empty @gem.dependent_gems
+
+ bonobo = quick_spec 'bonobo'
+
+ expected = [
+ [@gem, @bonobo, [bonobo]],
+ ]
+
+ assert_equal expected, bonobo.dependent_gems
+ end
+
def test_doc_dir
assert_equal File.join(@gemhome, 'doc', 'a-1'), @a1.doc_dir
end
@@ -1550,13 +1564,13 @@ dependencies: []
@a2.add_runtime_dependency 'b', '1'
@a2.dependencies.first.instance_variable_set :@type, nil
@a2.required_rubygems_version = Gem::Requirement.new '> 0'
- @a2.require_paths << "lib/a/ext"
+ @a2.require_paths << 'other'
ruby_code = @a2.to_ruby
expected = <<-SPEC
# -*- encoding: utf-8 -*-
-# stub: a 2 ruby lib\0lib/a/ext
+# stub: a 2 ruby lib\0other
Gem::Specification.new do |s|
s.name = "a"
@@ -1569,7 +1583,7 @@ Gem::Specification.new do |s|
s.email = "example@example.com"
s.files = ["lib/code.rb"]
s.homepage = "http://example.com"
- s.require_paths = ["lib", "lib/a/ext"]
+ s.require_paths = ["lib", "other"]
s.rubygems_version = "#{Gem::VERSION}"
s.summary = "this is a summary"