aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_command_manager.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-13 19:58:57 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-13 19:58:57 +0000
commit1daa0b113d853bfa57b776cc569939b61ca14292 (patch)
treef8c4acb08a551820299dff2b13966d6ac38d31e4 /test/rubygems/test_gem_command_manager.rb
parent85995e88d49c442b5b113c2676456133e79f5c02 (diff)
downloadruby-1daa0b113d853bfa57b776cc569939b61ca14292.tar.gz
* lib/rubygems: Update to RubyGems 2.1.3
Fixed installing platform gems Restored concurrent requires Fixed installing gems with extensions with --install-dir Fixed `gem fetch -v` to install the latest version Fixed installing gems with "./" in their files entries * test/rubygems/test_gem_package.rb: Tests for the above. * NEWS: Updated for RubyGems 2.1.3 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_command_manager.rb')
-rw-r--r--test/rubygems/test_gem_command_manager.rb44
1 files changed, 21 insertions, 23 deletions
diff --git a/test/rubygems/test_gem_command_manager.rb b/test/rubygems/test_gem_command_manager.rb
index f6433c5cc3..e201d73275 100644
--- a/test/rubygems/test_gem_command_manager.rb
+++ b/test/rubygems/test_gem_command_manager.rb
@@ -58,7 +58,7 @@ class TestGemCommandManager < Gem::TestCase
use_ui @ui do
assert_raises Gem::MockGemUi::TermError do
- @command_manager.run %w[interrupt]
+ @command_manager.run 'interrupt'
end
assert_equal '', ui.output
assert_equal "ERROR: Interrupted\n", ui.error
@@ -75,7 +75,7 @@ class TestGemCommandManager < Gem::TestCase
@command_manager.register_command :crash
use_ui @ui do
assert_raises Gem::MockGemUi::TermError do
- @command_manager.run %w[crash]
+ @command_manager.run 'crash'
end
assert_equal '', ui.output
err = ui.error.split("\n").first
@@ -89,7 +89,7 @@ class TestGemCommandManager < Gem::TestCase
def test_process_args_bad_arg
use_ui @ui do
assert_raises Gem::MockGemUi::TermError do
- @command_manager.process_args %w[--bad-arg]
+ @command_manager.process_args("--bad-arg")
end
end
@@ -107,7 +107,7 @@ class TestGemCommandManager < Gem::TestCase
end
#check defaults
- @command_manager.process_args %w[install]
+ @command_manager.process_args("install")
assert_equal %w[ri], check_options[:document].sort
assert_equal false, check_options[:force]
assert_equal :both, check_options[:domain]
@@ -118,10 +118,8 @@ class TestGemCommandManager < Gem::TestCase
#check settings
check_options = nil
- @command_manager.process_args %w[
- install --force --local --rdoc --install-dir .
- --version 3.0 --no-wrapper --bindir .
- ]
+ @command_manager.process_args(
+ "install --force --local --rdoc --install-dir . --version 3.0 --no-wrapper --bindir . ")
assert_equal %w[rdoc ri], check_options[:document].sort
assert_equal true, check_options[:force]
assert_equal :local, check_options[:domain]
@@ -132,17 +130,17 @@ class TestGemCommandManager < Gem::TestCase
#check remote domain
check_options = nil
- @command_manager.process_args %w[install --remote]
+ @command_manager.process_args("install --remote")
assert_equal :remote, check_options[:domain]
#check both domain
check_options = nil
- @command_manager.process_args %w[install --both]
+ @command_manager.process_args("install --both")
assert_equal :both, check_options[:domain]
#check both domain
check_options = nil
- @command_manager.process_args %w[install --both]
+ @command_manager.process_args("install --both")
assert_equal :both, check_options[:domain]
end
end
@@ -157,12 +155,12 @@ class TestGemCommandManager < Gem::TestCase
end
#check defaults
- @command_manager.process_args %w[uninstall]
+ @command_manager.process_args("uninstall")
assert_equal Gem::Requirement.default, check_options[:version]
#check settings
check_options = nil
- @command_manager.process_args %w[uninstall foobar --version 3.0]
+ @command_manager.process_args("uninstall foobar --version 3.0")
assert_equal "foobar", check_options[:args].first
assert_equal Gem::Requirement.new('3.0'), check_options[:version]
end
@@ -177,12 +175,12 @@ class TestGemCommandManager < Gem::TestCase
end
#check defaults
- @command_manager.process_args %w[check]
+ @command_manager.process_args("check")
assert_equal true, check_options[:alien]
#check settings
check_options = nil
- @command_manager.process_args %w[check foobar --alien]
+ @command_manager.process_args("check foobar --alien")
assert_equal true, check_options[:alien]
end
@@ -196,12 +194,12 @@ class TestGemCommandManager < Gem::TestCase
end
#check defaults
- @command_manager.process_args %w[build]
+ @command_manager.process_args("build")
#NOTE: Currently no defaults
#check settings
check_options = nil
- @command_manager.process_args %w[build foobar.rb]
+ @command_manager.process_args("build foobar.rb")
assert_equal 'foobar.rb', check_options[:args].first
end
@@ -215,26 +213,26 @@ class TestGemCommandManager < Gem::TestCase
end
#check defaults
- @command_manager.process_args %w[query]
+ @command_manager.process_args("query")
assert_equal(//, check_options[:name])
assert_equal :local, check_options[:domain]
assert_equal false, check_options[:details]
#check settings
check_options = nil
- @command_manager.process_args %w[query --name foobar --local --details]
+ @command_manager.process_args("query --name foobar --local --details")
assert_equal(/foobar/i, check_options[:name])
assert_equal :local, check_options[:domain]
assert_equal true, check_options[:details]
#remote domain
check_options = nil
- @command_manager.process_args %w[query --remote]
+ @command_manager.process_args("query --remote")
assert_equal :remote, check_options[:domain]
#both (local/remote) domains
check_options = nil
- @command_manager.process_args %w[query --both]
+ @command_manager.process_args("query --both")
assert_equal :both, check_options[:domain]
end
@@ -248,12 +246,12 @@ class TestGemCommandManager < Gem::TestCase
end
#check defaults
- @command_manager.process_args %w[update]
+ @command_manager.process_args("update")
assert_includes check_options[:document], 'rdoc'
#check settings
check_options = nil
- @command_manager.process_args %w[update --force --rdoc --install-dir .]
+ @command_manager.process_args("update --force --rdoc --install-dir .")
assert_includes check_options[:document], 'ri'
assert_equal true, check_options[:force]
assert_equal Dir.pwd, check_options[:install_dir]