diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/rubygems/test_gem.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb index 3225a05c6b..8a11cc2ecf 100644 --- a/test/rubygems/test_gem.rb +++ b/test/rubygems/test_gem.rb @@ -1480,8 +1480,11 @@ class TestGem < Gem::TestCase end LIB_PATH = File.expand_path "../../../lib".dup.untaint, __FILE__.dup.untaint - BUNDLER_LIB_PATH = File.expand_path $LOAD_PATH.find {|lp| File.file?(File.join(lp, "bundler.rb")) }.dup.untaint - BUNDLER_FULL_NAME = "bundler-#{Bundler::VERSION}" + + if Gem::USE_BUNDLER_FOR_GEMDEPS + BUNDLER_LIB_PATH = File.expand_path $LOAD_PATH.find {|lp| File.file?(File.join(lp, "bundler.rb")) }.dup.untaint + BUNDLER_FULL_NAME = "bundler-#{Bundler::VERSION}" + end def add_bundler_full_name(names) return names unless Gem::USE_BUNDLER_FOR_GEMDEPS @@ -1529,7 +1532,7 @@ class TestGem < Gem::TestCase out = IO.popen(cmd, &:read).split(/\n/) assert_equal ["b-1", "c-1"], out - out0 - end + end if Gem::USE_BUNDLER_FOR_GEMDEPS def test_looks_for_gemdeps_files_automatically_on_start_in_parent_dir util_clear_gems @@ -1574,7 +1577,7 @@ class TestGem < Gem::TestCase Dir.rmdir "sub1" assert_equal ["b-1", "c-1"], out - out0 - end + end if Gem::USE_BUNDLER_FOR_GEMDEPS def test_register_default_spec Gem.clear_default_specs @@ -1775,7 +1778,7 @@ You may need to `gem install -g` to install missing gems end ensure ENV['RUBYGEMS_GEMDEPS'] = rubygems_gemdeps - end + end if Gem::USE_BUNDLER_FOR_GEMDEPS def test_use_gemdeps_specific skip 'Insecure operation - read' if RUBY_VERSION <= "1.8.7" |