1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rubygems: Update to RubyGems 2.0.4. See

https://github.com/rubygems/rubygems/blob/2.0/History.txt for changes


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2013-07-08 22:41:03 +00:00
parent fa343a796f
commit 7083cebeae
32 changed files with 306 additions and 111 deletions

View file

@ -61,6 +61,22 @@ class TestGemCommandsPushCommand < Gem::TestCase
assert_match @response, @ui.output
end
def test_execute
open 'example', 'w' do |io| io.write 'hello' end
@response = "Successfully registered gem: freewill (1.0.0)"
@fetcher.data["#{Gem.host}/api/v1/gems"] = [@response, 200, 'OK']
@cmd.options[:args] = %w[example]
@cmd.execute
assert_equal Net::HTTP::Post, @fetcher.last_request.class
assert_equal 'hello', @fetcher.last_request.body
assert_equal "application/octet-stream",
@fetcher.last_request["Content-Type"]
end
def test_execute_host
host = 'https://other.example'