summaryrefslogtreecommitdiff
path: root/test/csv
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-08 06:50:03 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-08 06:50:03 +0000
commit63a164f32ed6c62cd40304837ad8f8a3f93a4296 (patch)
tree86eab86b684a6bd49174abb85aa4adda13c201c1 /test/csv
parenta0d2cd2e1eee9765b14506360d51d6b1e2f23b58 (diff)
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
Diffstat (limited to 'test/csv')
-rwxr-xr-xtest/csv/test_features.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/csv/test_features.rb b/test/csv/test_features.rb
index 33166e8..1c178d1 100755
--- a/test/csv/test_features.rb
+++ b/test/csv/test_features.rb
@@ -7,7 +7,10 @@
# Copyright 2005 James Edward Gray II. You can redistribute or modify this code
# under the terms of Ruby's license.
-require "zlib"
+begin
+ require "zlib"
+rescue LoadError
+end
require_relative "base"
@@ -205,7 +208,7 @@ class TestCSV::Features < TestCSV
)
end
assert_equal("\r\n", zipped.row_sep)
- end
+ end if defined?(Zlib::GzipReader)
def test_gzip_writer_bug_fix
tempfile = Tempfile.new(%w"temp .gz")
@@ -223,7 +226,7 @@ class TestCSV::Features < TestCSV
include?($INPUT_RECORD_SEPARATOR),
"@row_sep did not default" )
tempfile.close(true)
- end
+ end if defined?(Zlib::GzipWriter)
def test_inspect_is_smart_about_io_types
str = CSV.new("string,data").inspect