From d478c7a7342478847cc1148f4134b5f0db04e1d9 Mon Sep 17 00:00:00 2001 From: drbrain Date: Thu, 25 Sep 2008 10:13:50 +0000 Subject: Update to RubyGems 1.3.0 r1891 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rubygems/test_gem_gem_path_searcher.rb | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'test/rubygems/test_gem_gem_path_searcher.rb') diff --git a/test/rubygems/test_gem_gem_path_searcher.rb b/test/rubygems/test_gem_gem_path_searcher.rb index c9da4d2b05..a6124df84d 100644 --- a/test/rubygems/test_gem_gem_path_searcher.rb +++ b/test/rubygems/test_gem_gem_path_searcher.rb @@ -5,10 +5,6 @@ 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 @@ -40,6 +36,10 @@ class TestGemGemPathSearcher < RubyGemTestCase assert_equal @foo1, @gps.find('foo') end + def test_find_all + assert_equal [@foo1], @gps.find_all('foo') + end + def test_init_gemspecs assert_equal [@bar2, @bar1, @foo2, @foo1], @gps.init_gemspecs end @@ -51,9 +51,17 @@ class TestGemGemPathSearcher < RubyGemTestCase assert_equal expected, lib_dirs end - def test_matching_file - assert !@gps.matching_file(@foo1, 'bar') - assert @gps.matching_file(@foo1, 'foo') + def test_matching_file_eh + assert !@gps.matching_file?(@foo1, 'bar') + assert @gps.matching_file?(@foo1, 'foo') + end + + def test_matching_files + assert_equal [], @gps.matching_files(@foo1, 'bar') + + expected = File.join @foo1.full_gem_path, 'lib', 'foo.rb' + + assert_equal [expected], @gps.matching_files(@foo1, 'foo') end end -- cgit v1.2.3