mirror of
https://github.com/ruby/ruby.git
synced 2025-09-24 13:03:57 +02:00
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:
parent
cae4fb76dc
commit
db74541efe
19 changed files with 275 additions and 95 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue