diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-20 00:34:58 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-20 00:34:58 +0000 |
commit | 75eb6cc98ed3c6862769e839941c27591da2d700 (patch) | |
tree | f430e151509492edc179789b5f78f50e5f3631f2 /test | |
parent | cd8ef79d22f7e21bdae622634657aef5a8845640 (diff) | |
download | ruby-75eb6cc98ed3c6862769e839941c27591da2d700.tar.gz |
* lib/rubygems/commands/update_command.rb: Create the installer after
options are processed. [ruby-trunk - Bug #7779]
* test/rubygems/test_gem_commands_update_command.rb: Test for the
above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/rubygems/test_gem_commands_update_command.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_commands_update_command.rb b/test/rubygems/test_gem_commands_update_command.rb index 536a3d57fb..006d821210 100644 --- a/test/rubygems/test_gem_commands_update_command.rb +++ b/test/rubygems/test_gem_commands_update_command.rb @@ -355,6 +355,23 @@ class TestGemCommandsUpdateCommand < Gem::TestCase assert_empty out end + def test_execute_user_install + util_clear_gems + + Gem::Installer.new(@a1_path).install + + @cmd.handle_options %w[--user-install] + + use_ui @ui do + @cmd.execute + end + + installer = @cmd.installer + user_install = installer.instance_variable_get :@user_install + + assert user_install, 'user_install must be set on the installer' + end + def test_handle_options_system @cmd.handle_options %w[--system] |