diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-02 11:48:18 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-02 11:48:18 +0000 |
commit | f28be7e02d113bd26c33cb94e65004055576c065 () | |
tree | 48b87f5a2b647e1207bae5e29f40d6d5b526978d /test/rubygems/test_gem.rb | |
parent | 537024433720d7c54cba9bab4596638f59fbadc9 (diff) |
Merge rubygems/rubygems from upstream.
The current master branch is https://.com/rubygems/rubygems/commit/97b264f0fa248c864b6ee9a23d3ff1cdd217dddb git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/rubygems/test_gem.rb | 49 |
1 files changed, 24 insertions, 25 deletions
@@ -954,37 +954,23 @@ class TestGem < Gem::TestCase end def test_self_ruby_escaping_spaces_in_path - orig_bindir = RbConfig::CONFIG['bindir'] - orig_exe_ext = RbConfig::CONFIG['EXEEXT'] - - RbConfig::CONFIG['bindir'] = "C:/Ruby 1.8/bin" - RbConfig::CONFIG['EXEEXT'] = ".exe" - - ruby_install_name "ruby" do - with_clean_path_to_ruby do - assert_equal "\"C:/Ruby 1.8/bin/ruby.exe\"", Gem.ruby end end - ensure - RbConfig::CONFIG['bindir'] = orig_bindir - RbConfig::CONFIG['EXEEXT'] = orig_exe_ext end def test_self_ruby_path_without_spaces - orig_bindir = RbConfig::CONFIG['bindir'] - orig_exe_ext = RbConfig::CONFIG['EXEEXT'] - - RbConfig::CONFIG['bindir'] = "C:/Ruby18/bin" - RbConfig::CONFIG['EXEEXT'] = ".exe" - - ruby_install_name "ruby" do - with_clean_path_to_ruby do - assert_equal "C:/Ruby18/bin/ruby.exe", Gem.ruby end end - ensure - RbConfig::CONFIG['bindir'] = orig_bindir - RbConfig::CONFIG['EXEEXT'] = orig_exe_ext end def test_self_ruby_api_version @@ -1902,6 +1888,19 @@ You may need to `gem install -g` to install missing gems end end def with_clean_path_to_ruby orig_ruby = Gem.ruby @@ -1909,7 +1908,7 @@ You may need to `gem install -g` to install missing gems yield ensure - Gem.instance_variable_set("@ruby", orig_ruby) end def with_plugin(path) |