aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_commands_setup_command.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-11 21:29:32 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-11 21:29:32 +0000
commit10c5d6ee2593f5b6a0361009201464c248158da6 (patch)
treeffae8e3894c1e1a93a6293b17ab4b7633043d8e4 /test/rubygems/test_gem_commands_setup_command.rb
parent21c1e2da06c76e825feeeec9233c3e5a9f0345a0 (diff)
downloadruby-10c5d6ee2593f5b6a0361009201464c248158da6.tar.gz
* lib/rubygems/commands/setup_command.rb: Don't delete non-rubygems
files when installing RubyGems. * test/rubygems/test_gem_commands_setup_command.rb: Test for the above. * lib/rubygems/ext/ext_conf_builder.rb: Use full path to siteconf.rb in case the extconf.rb changes directories (like memcached does). * lib/rubygems/package.rb: Remove double slash from path. * test/rubygems/test_gem_package.rb: Test for the above. * test/rubygems/test_gem_package_old.rb: ditto. * lib/rubygems/source.rb: Revert automatic HTTPS upgrade * lib/rubygems/spec_fetcher.rb: ditto. * test/rubygems/test_gem_remote_fetcher.rb: ditto. * test/rubygems/test_gem_source.rb: ditto. * test/rubygems/test_gem_spec_fetcher.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_commands_setup_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_setup_command.rb29
1 files changed, 22 insertions, 7 deletions
diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb
index 86d5d0d4db..16298c9393 100644
--- a/test/rubygems/test_gem_commands_setup_command.rb
+++ b/test/rubygems/test_gem_commands_setup_command.rb
@@ -41,21 +41,36 @@ class TestGemCommandsSetupCommand < Gem::TestCase
end
def test_remove_old_lib_files
- lib = File.join @install_dir, 'lib'
- lib_rubygems = File.join lib, 'rubygems'
+ lib = File.join @install_dir, 'lib'
+ lib_rubygems = File.join lib, 'rubygems'
+ lib_rubygems_defaults = File.join lib_rubygems, 'defaults'
- old_builder_rb = File.join lib_rubygems, 'builder.rb'
- old_format_rb = File.join lib_rubygems, 'format.rb'
+ securerandom_rb = File.join lib, 'securerandom.rb'
- FileUtils.mkdir_p lib_rubygems
+ engine_defaults_rb = File.join lib_rubygems_defaults, 'jruby.rb'
+ os_defaults_rb = File.join lib_rubygems_defaults, 'operating_system.rb'
- open old_builder_rb, 'w' do |io| io.puts '# builder.rb' end
- open old_format_rb, 'w' do |io| io.puts '# format.rb' end
+ old_builder_rb = File.join lib_rubygems, 'builder.rb'
+ old_format_rb = File.join lib_rubygems, 'format.rb'
+
+ FileUtils.mkdir_p lib_rubygems_defaults
+
+ open securerandom_rb, 'w' do |io| io.puts '# securerandom.rb' end
+
+ open old_builder_rb, 'w' do |io| io.puts '# builder.rb' end
+ open old_format_rb, 'w' do |io| io.puts '# format.rb' end
+
+ open engine_defaults_rb, 'w' do |io| io.puts '# jruby.rb' end
+ open os_defaults_rb, 'w' do |io| io.puts '# operating_system.rb' end
@cmd.remove_old_lib_files lib
refute_path_exists old_builder_rb
refute_path_exists old_format_rb
+
+ assert_path_exists securerandom_rb
+ assert_path_exists engine_defaults_rb
+ assert_path_exists os_defaults_rb
end
end