summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_server.rb
diff options
context:
space:
mode:
authorryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-01 03:45:05 +0000
committerryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-01 03:45:05 +0000
commitd22130922e7842226d38d59680e4bbb48a28a5f0 (patch)
tree39594d3a14641dd5488a99a5e633239296fa5742 /test/rubygems/test_gem_server.rb
parent4752539e3f3e563d559732c52424206bd6f12dbd (diff)
Import rubygems 1.8.5 (released @ 137c80f)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_server.rb')
-rw-r--r--test/rubygems/test_gem_server.rb38
1 files changed, 23 insertions, 15 deletions
diff --git a/test/rubygems/test_gem_server.rb b/test/rubygems/test_gem_server.rb
index 3fad8c486e..bd4d960ecc 100644
--- a/test/rubygems/test_gem_server.rb
+++ b/test/rubygems/test_gem_server.rb
@@ -9,12 +9,10 @@ require 'rubygems/server'
require 'stringio'
class Gem::Server
- attr_accessor :source_index
attr_reader :server
end
class TestGemServer < Gem::TestCase
-
def setup
super
@@ -41,52 +39,64 @@ class TestGemServer < Gem::TestCase
data = StringIO.new "GET /Marshal.#{Gem.marshal_version} HTTP/1.0\r\n\r\n"
@req.parse data
- @server.Marshal @req, @res
+ Deprecate.skip_during do
+ @server.Marshal @req, @res
+ end
assert_equal 200, @res.status, @res.body
assert_match %r| \d\d:\d\d:\d\d |, @res['date']
assert_equal 'application/octet-stream', @res['content-type']
- si = Gem::SourceIndex.new
- si.add_specs @a1, @a2
+ Deprecate.skip_during do
+ si = Gem::SourceIndex.new
+ si.add_specs @a1, @a2
- assert_equal si, Marshal.load(@res.body)
+ assert_equal si, Marshal.load(@res.body)
+ end
end
def test_Marshal_Z
data = StringIO.new "GET /Marshal.#{Gem.marshal_version}.Z HTTP/1.0\r\n\r\n"
@req.parse data
- @server.Marshal @req, @res
+ Deprecate.skip_during do
+ @server.Marshal @req, @res
+ end
assert_equal 200, @res.status, @res.body
assert_match %r| \d\d:\d\d:\d\d |, @res['date']
assert_equal 'application/x-deflate', @res['content-type']
- si = Gem::SourceIndex.new
- si.add_specs @a1, @a2
+ Deprecate.skip_during do
+ si = Gem::SourceIndex.new
+ si.add_specs @a1, @a2
- assert_equal si, Marshal.load(Gem.inflate(@res.body))
+ assert_equal si, Marshal.load(Gem.inflate(@res.body))
+ end
end
def test_latest_specs
data = StringIO.new "GET /latest_specs.#{Gem.marshal_version} HTTP/1.0\r\n\r\n"
@req.parse data
- @server.latest_specs @req, @res
+ Deprecate.skip_during do
+ @server.latest_specs @req, @res
+ end
assert_equal 200, @res.status, @res.body
assert_match %r| \d\d:\d\d:\d\d |, @res['date']
assert_equal 'application/octet-stream', @res['content-type']
assert_equal [['a', Gem::Version.new(2), Gem::Platform::RUBY]],
- Marshal.load(@res.body)
+ Marshal.load(@res.body)
end
def test_latest_specs_gz
data = StringIO.new "GET /latest_specs.#{Gem.marshal_version}.gz HTTP/1.0\r\n\r\n"
@req.parse data
- @server.latest_specs @req, @res
+ Deprecate.skip_during do
+ @server.latest_specs @req, @res
+ end
assert_equal 200, @res.status, @res.body
assert_match %r| \d\d:\d\d:\d\d |, @res['date']
@@ -227,6 +237,4 @@ class TestGemServer < Gem::TestCase
@server.instance_variable_set :@server, webrick
end
-
end
-