diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-25 15:13:14 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-25 15:13:14 +0000 |
commit | d0233291bc8a5068e52c69c210e5979e5324b5bc (patch) | |
tree | 7d9459449c33792c63eeb7baa071e76352e0baab /trunk/test/rubygems/test_gem_gem_path_searcher.rb | |
parent | 0dc342de848a642ecce8db697b8fecd83a63e117 (diff) | |
parent | 72eaacaa15256ab95c3b52ea386f88586fb9da40 (diff) |
re-adding tag v1_9_0_4 as an alias of trunk@18848v1_9_0_4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_9_0_4@18849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'trunk/test/rubygems/test_gem_gem_path_searcher.rb')
-rw-r--r-- | trunk/test/rubygems/test_gem_gem_path_searcher.rb | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/trunk/test/rubygems/test_gem_gem_path_searcher.rb b/trunk/test/rubygems/test_gem_gem_path_searcher.rb deleted file mode 100644 index c9da4d2b05..0000000000 --- a/trunk/test/rubygems/test_gem_gem_path_searcher.rb +++ /dev/null @@ -1,60 +0,0 @@ -require 'test/unit' -require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities') -require 'rubygems/gem_path_searcher' - -class Gem::GemPathSearcher - attr_accessor :gemspecs - attr_accessor :lib_dirs - - public :init_gemspecs - public :matching_file - public :lib_dirs_for -end - -class TestGemGemPathSearcher < RubyGemTestCase - - def setup - super - - @foo1 = quick_gem 'foo', '0.1' do |s| - s.require_paths << 'lib2' - s.files << 'lib/foo.rb' - end - - path = File.join 'gems', @foo1.full_name, 'lib', 'foo.rb' - write_file(path) { |fp| fp.puts "# #{path}" } - - @foo2 = quick_gem 'foo', '0.2' - @bar1 = quick_gem 'bar', '0.1' - @bar2 = quick_gem 'bar', '0.2' - - @fetcher = Gem::FakeFetcher.new - Gem::RemoteFetcher.fetcher = @fetcher - - Gem.source_index = util_setup_spec_fetcher @foo1, @foo2, @bar1, @bar2 - - @gps = Gem::GemPathSearcher.new - end - - def test_find - assert_equal @foo1, @gps.find('foo') - end - - def test_init_gemspecs - assert_equal [@bar2, @bar1, @foo2, @foo1], @gps.init_gemspecs - end - - def test_lib_dirs_for - lib_dirs = @gps.lib_dirs_for(@foo1) - expected = File.join @gemhome, 'gems', @foo1.full_name, '{lib,lib2}' - - assert_equal expected, lib_dirs - end - - def test_matching_file - assert !@gps.matching_file(@foo1, 'bar') - assert @gps.matching_file(@foo1, 'foo') - end - -end - |