summaryrefslogtreecommitdiff
path: root/test/csv
diff options
context:
space:
mode:
Diffstat (limited to 'test/csv')
-rw-r--r--test/csv/test_encodings.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/csv/test_encodings.rb b/test/csv/test_encodings.rb
index 63f7207c29..5d29ac1fa9 100644
--- a/test/csv/test_encodings.rb
+++ b/test/csv/test_encodings.rb
@@ -197,8 +197,12 @@ class TestEncodings < Test::Unit::TestCase
def test_can_write_csv_in_any_encoding
each_encoding do |encoding|
# test generate_line with encoding hint
- csv = %w[abc d|ef].map { |f| f.encode(encoding) }.
- to_csv(col_sep: "|", encoding: encoding.name)
+ begin
+ csv = %w[abc d|ef].map { |f| f.encode(encoding) }.
+ to_csv(col_sep: "|", encoding: encoding.name)
+ rescue Encoding::ConverterNotFoundError
+ next
+ end
assert_equal(encoding, csv.encoding)
# test generate_line with encoding guessing from fields