diff options
Diffstat (limited to 'test/rubygems/test_gem.rb')
-rw-r--r-- | test/rubygems/test_gem.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb index ccdd2e3c08..e18004c4ea 100644 --- a/test/rubygems/test_gem.rb +++ b/test/rubygems/test_gem.rb @@ -266,6 +266,8 @@ class TestGem < RubyGemTestCase def test_self_find_files discover_path = File.join 'lib', 'foo', 'discover.rb' + cwd = File.expand_path('..', __FILE__) + $LOAD_PATH.unshift(cwd.dup) foo1 = quick_gem 'foo', '1' do |s| s.files << discover_path @@ -289,12 +291,14 @@ class TestGem < RubyGemTestCase Gem.searcher = nil expected = [ - File.expand_path('foo/discover.rb', File.dirname(__FILE__)), + File.expand_path('../foo/discover.rb', __FILE__), File.join(foo2.full_gem_path, discover_path), File.join(foo1.full_gem_path, discover_path), ] assert_equal expected, Gem.find_files('foo/discover') + ensure + assert_equal(cwd, $LOAD_PATH.shift) end def test_self_latest_load_paths |