aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_commands_open_command.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-05 13:42:45 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-05 13:42:45 +0000
commitc3546c76c8f1c9d61e65d08e8b2dfca2e2098736 (patch)
tree6f3288db1b5970c4d4c65d7736719ef15b44a328 /test/rubygems/test_gem_commands_open_command.rb
parent69be3620302aab57c43014aca08629c9d7b7ce44 (diff)
downloadruby-c3546c76c8f1c9d61e65d08e8b2dfca2e2098736.tar.gz
* lib/rubygems: Update to RubyGems HEAD(5c3b6f3).
Fixed #1156, #1142, #1115, #1142, #1139 on rubygems/rubygems * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_commands_open_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_open_command.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/rubygems/test_gem_commands_open_command.rb b/test/rubygems/test_gem_commands_open_command.rb
index 25f22c81b3..c1c76f95c9 100644
--- a/test/rubygems/test_gem_commands_open_command.rb
+++ b/test/rubygems/test_gem_commands_open_command.rb
@@ -15,18 +15,24 @@ class TestGemCommandsOpenCommand < Gem::TestCase
end
write_file File.join(*%W[gems #{spec.full_name} lib #{name}.rb])
write_file File.join(*%W[gems #{spec.full_name} Rakefile])
+ spec
end
def test_execute
@cmd.options[:args] = %w[foo]
@cmd.options[:editor] = "#{Gem.ruby} -e0 --"
- gem 'foo'
+ spec = gem 'foo'
+ mock = MiniTest::Mock.new
+ mock.expect(:call, true, [spec.full_gem_path])
- use_ui @ui do
- @cmd.execute
+ Dir.stub(:chdir, mock) do
+ use_ui @ui do
+ @cmd.execute
+ end
end
+ assert mock.verify
assert_equal "", @ui.error
end