From 63a164f32ed6c62cd40304837ad8f8a3f93a4296 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 8 May 2012 06:50:03 +0000 Subject: test: fix test conditions * test/csv/test_features.rb (TestCSV#test_gzip_reader_bug_fix): test only if zlib is available. * test/csv/test_features.rb (TestCSV#test_gzip_writer_bug_fix): ditto. * test/open-uri/test_open-uri.rb (TestOpenURI#test_content_encoding): ditto. * test/rexml/test_order.rb (OrderTester#test_more_ordering): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/open-uri/test_open-uri.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'test/open-uri') diff --git a/test/open-uri/test_open-uri.rb b/test/open-uri/test_open-uri.rb index 0cae2d56fd..2b0cfc622f 100644 --- a/test/open-uri/test_open-uri.rb +++ b/test/open-uri/test_open-uri.rb @@ -2,7 +2,10 @@ require 'test/unit' require 'open-uri' require 'webrick' require 'webrick/httpproxy' -require 'zlib' +begin + require 'zlib' +rescue LoadError +end class TestOpenURI < Test::Unit::TestCase @@ -497,7 +500,7 @@ class TestOpenURI < Test::Unit::TestCase assert_equal(content_gz, f.read.force_encoding("ascii-8bit")) } } - end + end if defined?(Zlib::GzipWriter) # 192.0.2.0/24 is TEST-NET. [RFC3330] -- cgit v1.2.3