diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-02-01 12:43:26 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-02-01 12:43:26 +0000 |
commit | a21d403f21473b21b5766c2483b4325240e9edda (patch) | |
tree | bd10197f9589251f35f0f9dc6fa387f0e298a6ef /test/rubygems/test_gem_installer.rb | |
parent | 94cfa2893ccab71341d4671201253339d56d6c97 (diff) | |
download | ruby-a21d403f21473b21b5766c2483b4325240e9edda.tar.gz |
* lib/rubygems.rb, lib/rubygems/*, test/rubygems/*: Update rubygems-2.5.2.
It supports to enable frozen string literal and add `--norc` option for
disable to `.gemrc` configuration.
See 2.5.2 release notes for other fixes and enhancements.
https://github.com/rubygems/rubygems/blob/a8aa3bac723f045c52471c7b9328310a048561e0/History.txt#L3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_installer.rb')
-rw-r--r-- | test/rubygems/test_gem_installer.rb | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb index 129c235abb..5ec71d0a01 100644 --- a/test/rubygems/test_gem_installer.rb +++ b/test/rubygems/test_gem_installer.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require 'rubygems/installer_test_case' class TestGemInstaller < Gem::InstallerTestCase @@ -48,7 +48,6 @@ if ARGV.first end end -gem 'a', version load Gem.bin_path('a', 'executable', version) EOF @@ -803,14 +802,14 @@ gem 'other', version begin Gem::Specification.reset - e = assert_raises Gem::LoadError do + e = assert_raises Gem::GemNotFoundException do instance_eval File.read(exe) end ensure ARGV.shift if ARGV.first == "_3.0_" end - assert_match(/\(= 3\.0\)/, e.message) + assert_includes(e.message, "can't find gem a (= 3.0)") end def test_install_creates_binstub_that_dont_trust_encoding @@ -831,7 +830,7 @@ gem 'other', version exe = File.join @gemhome, 'bin', 'executable' - extra_arg = "\xE4pfel".force_encoding("UTF-8") + extra_arg = "\xE4pfel".dup.force_encoding("UTF-8") ARGV.unshift extra_arg begin @@ -1001,6 +1000,19 @@ gem 'other', version assert_match %r|I am a shiny gem!|, @ui.output end + def test_install_with_skipped_message + @spec.post_install_message = 'I am a shiny gem!' + + use_ui @ui do + path = Gem::Package.build @spec + + @installer = Gem::Installer.at path, :post_install_message => false + @installer.install + end + + refute_match %r|I am a shiny gem!|, @ui.output + end + def test_install_extension_dir gemhome2 = "#{@gemhome}2" |