mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 17:43:59 +02:00
Merge trunk revision: 39327
* 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/branches/ruby_2_0_0@39344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bf2b8c8925
commit
79db75dc4e
3 changed files with 30 additions and 1 deletions
|
@ -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]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue