Update to RubyGems 0.9.5

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2007-11-20 05:56:43 +00:00
parent cae4fb76dc
commit db74541efe
19 changed files with 275 additions and 95 deletions

View file

@ -17,6 +17,24 @@ class TestGemFormat < RubyGemTestCase
@simple_gem = SIMPLE_GEM
end
def test_from_file_by_path
util_make_gems
gems = Dir[File.join(@gemhome, 'cache', '*.gem')]
names = [@a0_0_1, @a0_0_2, @b0_0_2, @c1_2, @pl1].map do |spec|
spec.original_name
end
gems_n_names = gems.sort.zip names
gems_n_names.each do |gemfile, name|
spec = Gem::Format.from_file_by_path(gemfile).spec
assert_equal name, spec.original_name
end
end
def test_from_file_by_path_nonexistent
assert_raise Gem::Exception do
Gem::Format.from_file_by_path '/nonexistent'