aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_remote_fetcher.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-17 22:04:18 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-17 22:04:18 +0000
commit9d4f37f51fb2ffdef5e318afb3cb81516dcba4f7 (patch)
tree2eb3c16c59259a25f5d9315edacc61dfc8c59d62 /test/rubygems/test_gem_remote_fetcher.rb
parentf98e6b91dec68ddd010ccb3bad651a18e7dca338 (diff)
downloadruby-9d4f37f51fb2ffdef5e318afb3cb81516dcba4f7.tar.gz
Update RubyGems to 1.1.1 r1778 (almost 1.2)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_remote_fetcher.rb')
-rw-r--r--test/rubygems/test_gem_remote_fetcher.rb23
1 files changed, 14 insertions, 9 deletions
diff --git a/test/rubygems/test_gem_remote_fetcher.rb b/test/rubygems/test_gem_remote_fetcher.rb
index ddadeb9fcf..1d2103bd06 100644
--- a/test/rubygems/test_gem_remote_fetcher.rb
+++ b/test/rubygems/test_gem_remote_fetcher.rb
@@ -24,7 +24,7 @@ require 'rubygems/remote_fetcher'
# Note that the proxy server is not a *real* proxy server. But our
# software doesn't really care, as long as we hit the proxy URL when a
# proxy is configured.
-#
+
class TestGemRemoteFetcher < RubyGemTestCase
include Gem::DefaultUserInteraction
@@ -105,7 +105,7 @@ gems:
@a1, @a1_gem = util_gem 'a', '1' do |s| s.executables << 'a_bin' end
- Gem::RemoteFetcher.instance_variable_set :@fetcher, nil
+ Gem::RemoteFetcher.fetcher = nil
end
def test_self_fetcher
@@ -144,7 +144,7 @@ gems:
def test_fetch_size_socket_error
fetcher = Gem::RemoteFetcher.new nil
- def fetcher.connect_to(host, port)
+ def fetcher.connection_for(uri)
raise SocketError
end
@@ -153,7 +153,8 @@ gems:
fetcher.fetch_size uri
end
- assert_equal "SocketError (SocketError)\n\tgetting size of #{uri}", e.message
+ assert_equal "SocketError (SocketError)\n\tfetching size (#{uri})",
+ e.message
end
def test_no_proxy
@@ -182,7 +183,7 @@ gems:
@test_data
end
- raise Gem::RemoteFetcher::FetchError, "haha!"
+ raise Gem::RemoteFetcher::FetchError.new("haha!", nil)
end
end
@@ -371,7 +372,8 @@ gems:
fetcher.fetch_path 'uri'
end
- assert_equal 'EOFError: EOFError reading uri', e.message
+ assert_equal 'EOFError: EOFError (uri)', e.message
+ assert_equal 'uri', e.uri
end
def test_fetch_path_socket_error
@@ -383,7 +385,8 @@ gems:
fetcher.fetch_path 'uri'
end
- assert_equal 'SocketError: SocketError reading uri', e.message
+ assert_equal 'SocketError: SocketError (uri)', e.message
+ assert_equal 'uri', e.uri
end
def test_fetch_path_system_call_error
@@ -397,8 +400,9 @@ gems:
fetcher.fetch_path 'uri'
end
- assert_match %r|ECONNREFUSED:.*connect\(2\) reading uri\z|,
+ assert_match %r|ECONNREFUSED:.*connect\(2\) \(uri\)\z|,
e.message
+ assert_equal 'uri', e.uri
end
def test_get_proxy_from_env_empty
@@ -494,7 +498,8 @@ gems:
fetcher.send :open_uri_or_path, 'http://gems.example.com/redirect'
end
- assert_equal 'too many redirects', e.message
+ assert_equal 'too many redirects (http://gems.example.com/redirect)',
+ e.message
end
def test_zip