aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_commands_uninstall_command.rb
diff options
context:
space:
mode:
authorryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-28 23:46:47 +0000
committerryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-28 23:46:47 +0000
commit934f537b458778f4786716c95b73fc72bc1ce256 (patch)
tree6abdecd9956995a7f82c9f969c80657b4301f6bd /test/rubygems/test_gem_commands_uninstall_command.rb
parentb511e1bfbe649b938e317e00ad1795f1b9623758 (diff)
downloadruby-934f537b458778f4786716c95b73fc72bc1ce256.tar.gz
Import rubygems 1.5.0 (release candidate @ 09893d9)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_commands_uninstall_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_uninstall_command.rb26
1 files changed, 16 insertions, 10 deletions
diff --git a/test/rubygems/test_gem_commands_uninstall_command.rb b/test/rubygems/test_gem_commands_uninstall_command.rb
index cb995cd941..c5be3beb90 100644
--- a/test/rubygems/test_gem_commands_uninstall_command.rb
+++ b/test/rubygems/test_gem_commands_uninstall_command.rb
@@ -4,20 +4,16 @@
# File a patch instead and assign it to Ryan Davis or Eric Hodel.
######################################################################
-require "test/rubygems/gemutilities"
-require "test/rubygems/gem_installer_test_case"
+require 'rubygems/installer_test_case'
require 'rubygems/commands/uninstall_command'
-class TestGemCommandsUninstallCommand < GemInstallerTestCase
+class TestGemCommandsUninstallCommand < Gem::InstallerTestCase
def setup
super
- ui = MockGemUi.new
- util_setup_gem ui
-
build_rake_in do
- use_ui ui do
+ use_ui @ui do
@installer.install
end
end
@@ -28,15 +24,25 @@ class TestGemCommandsUninstallCommand < GemInstallerTestCase
end
def test_execute_removes_executable
+ ui = Gem::MockGemUi.new
+ util_setup_gem ui
+
+ build_rake_in do
+ use_ui ui do
+ @installer.install
+ end
+ end
+
if win_platform?
- assert_equal true, File.exist?(@executable)
+ assert File.exist?(@executable)
else
- assert_equal true, File.symlink?(@executable)
+ assert File.symlink?(@executable)
end
# Evil hack to prevent false removal success
FileUtils.rm_f @executable
- File.open(@executable, "wb+") {|f| f.puts "binary"}
+
+ open(@executable, "wb+") {|f| f.puts "binary"}
@cmd.options[:args] = Array(@spec.name)
use_ui @ui do