diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-08 22:41:03 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-08 22:41:03 +0000 |
commit | 7083cebeaea83096128fc5ccb5f60bfbe5bcc939 (patch) | |
tree | fb25c12a6cc01a1a8de5221d64da632418e194a3 /test/rubygems/test_gem_commands_push_command.rb | |
parent | fa343a796fd256fc9098db7fdddf226fe5cbd181 (diff) | |
download | ruby-7083cebeaea83096128fc5ccb5f60bfbe5bcc939.tar.gz |
* 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
Diffstat (limited to 'test/rubygems/test_gem_commands_push_command.rb')
-rw-r--r-- | test/rubygems/test_gem_commands_push_command.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_commands_push_command.rb b/test/rubygems/test_gem_commands_push_command.rb index 73fd7bf540..52109d0ae4 100644 --- a/test/rubygems/test_gem_commands_push_command.rb +++ b/test/rubygems/test_gem_commands_push_command.rb @@ -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' |