diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-13 00:51:04 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-13 00:51:04 +0000 |
commit | 8fadbe5f3e5e8b2d9f635a274b4121811313de84 (patch) | |
tree | 3dc303b2b09eb4c54d19e3c68172856d13d60e2b /test/rubygems | |
parent | c2dcb947aaf60421ca4035298059a029a0a24c26 (diff) | |
download | ruby-8fadbe5f3e5e8b2d9f635a274b4121811313de84.tar.gz |
* lib/rubygems: Update to RubyGems master ddac51f. Changes:
* Allow override for the shared gem installation directory for
rubygems packagers.
* Lock gem cache files for read and write to improve thread safety.
* Use io/console when available.
* Minor cleanup.
* test/rubygems: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems')
-rw-r--r-- | test/rubygems/test_gem_commands_cert_command.rb | 4 | ||||
-rw-r--r-- | test/rubygems/test_gem_specification.rb | 29 |
2 files changed, 31 insertions, 2 deletions
diff --git a/test/rubygems/test_gem_commands_cert_command.rb b/test/rubygems/test_gem_commands_cert_command.rb index a158a4442b..03063859f5 100644 --- a/test/rubygems/test_gem_commands_cert_command.rb +++ b/test/rubygems/test_gem_commands_cert_command.rb @@ -108,7 +108,7 @@ Added '/CN=alternate/DC=example' @cmd.execute end - output = @build_ui.output.split "\n" + output = @build_ui.output.squeeze("\n").split "\n" assert_equal "Passphrase for your Private Key: ", output.shift @@ -142,7 +142,7 @@ Added '/CN=alternate/DC=example' @cmd.execute end - output = @build_ui.output.split "\n" + output = @build_ui.output.squeeze("\n").split "\n" assert_equal "Passphrase for your Private Key: ", output.shift diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb index 4c35329003..7aa9d5aeb1 100644 --- a/test/rubygems/test_gem_specification.rb +++ b/test/rubygems/test_gem_specification.rb @@ -1461,6 +1461,35 @@ dependencies: [] RbConfig::CONFIG['ENABLE_SHARED'] = enable_shared end + def test_extension_dir_override + enable_shared, RbConfig::CONFIG['ENABLE_SHARED'] = + RbConfig::CONFIG['ENABLE_SHARED'], 'no' + + class << Gem + alias orig_default_ext_dir_for default_ext_dir_for + + def Gem.default_ext_dir_for(base_dir) + 'elsewhere' + end + end + + ext_spec + + refute_empty @ext.extensions + + expected = File.join @tempdir, 'elsewhere', @ext.full_name + + assert_equal expected, @ext.extension_dir + ensure + RbConfig::CONFIG['ENABLE_SHARED'] = enable_shared + + class << Gem + remove_method :default_ext_dir_for + + alias default_ext_dir_for orig_default_ext_dir_for + end + end + def test_files @a1.files = %w(files bin/common) @a1.test_files = %w(test_files bin/common) |