mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 21:14:23 +02:00
[rubygems/rubygems] Add gem env user_gemhome
and gem env user_gemdir
14d3f80df6
This commit is contained in:
parent
f0fab24241
commit
a16de43f23
2 changed files with 25 additions and 0 deletions
|
@ -65,6 +65,28 @@ class TestGemCommandsEnvironmentCommand < Gem::TestCase
|
|||
assert_equal '', @ui.error
|
||||
end
|
||||
|
||||
def test_execute_user_gemdir
|
||||
@cmd.send :handle_options, %w[user_gemdir]
|
||||
|
||||
use_ui @ui do
|
||||
@cmd.execute
|
||||
end
|
||||
|
||||
assert_equal "#{Gem.user_dir}\n", @ui.output
|
||||
assert_equal '', @ui.error
|
||||
end
|
||||
|
||||
def test_execute_user_gemhome
|
||||
@cmd.send :handle_options, %w[user_gemhome]
|
||||
|
||||
use_ui @ui do
|
||||
@cmd.execute
|
||||
end
|
||||
|
||||
assert_equal "#{Gem.user_dir}\n", @ui.output
|
||||
assert_equal '', @ui.error
|
||||
end
|
||||
|
||||
def test_execute_gempath
|
||||
@cmd.send :handle_options, %w[gempath]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue