mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
9694bb8cac
* test/rubygems*: ditto. * common.mk (prelude): Updated for RubyGems 2.0 source rearrangement. * tool/change_maker.rb: Allow invalid UTF-8 characters in source files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
33 lines
635 B
Ruby
33 lines
635 B
Ruby
require 'rubygems/test_case'
|
|
require 'rubygems/source_specific_file'
|
|
|
|
class TestGemSourceSpecificFile < Gem::TestCase
|
|
def setup
|
|
super
|
|
|
|
@a, @a_gem = util_gem "a", '1'
|
|
@sf = Gem::Source::SpecificFile.new(@a_gem)
|
|
end
|
|
|
|
def test_spec
|
|
assert_equal @a, @sf.spec
|
|
end
|
|
|
|
def test_load_specs
|
|
assert_equal [@a.name_tuple], @sf.load_specs
|
|
end
|
|
|
|
def test_fetch_spec
|
|
assert_equal @a, @sf.fetch_spec(@a.name_tuple)
|
|
end
|
|
|
|
def test_fetch_spec_fails_on_unknown_name
|
|
assert_raises Gem::Exception do
|
|
@sf.fetch_spec(nil)
|
|
end
|
|
end
|
|
|
|
def test_download
|
|
assert_equal @a_gem, @sf.download(@a)
|
|
end
|
|
end
|