summaryrefslogtreecommitdiff
path: root/test/csv/helper.rb
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-14 21:01:51 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-14 21:01:51 +0000
commite3b6c7c7ebca1b051dbaa6f33494e92f5638fcc9 (patch)
treef98e60ecbeb320a9e9d8bdacfa3f9231cd55ddda /test/csv/helper.rb
parentfb96811d15f83c6b692e8e00d458eef32032af6a (diff)
Import CSV 3.0.8
This includes performance improvements and backward incompatibility fixes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/csv/helper.rb')
-rw-r--r--test/csv/helper.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/csv/helper.rb b/test/csv/helper.rb
index 4f7b00244b..2542cc9c97 100644
--- a/test/csv/helper.rb
+++ b/test/csv/helper.rb
@@ -1,5 +1,18 @@
+require "tempfile"
require "test/unit"
require "csv"
require_relative "../lib/with_different_ofs.rb"
+
+module Helper
+ def with_chunk_size(chunk_size)
+ chunk_size_keep = ENV["CSV_PARSER_SCANNER_TEST_CHUNK_SIZE"]
+ begin
+ ENV["CSV_PARSER_SCANNER_TEST_CHUNK_SIZE"] = chunk_size
+ yield
+ ensure
+ ENV["CSV_PARSER_SCANNER_TEST_CHUNK_SIZE"] = chunk_size_keep
+ end
+ end
+end