summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_server.rb
diff options
context:
space:
mode:
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 3fad8c4..bd4d960 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
-