summaryrefslogtreecommitdiff
path: root/test/csv/write
diff options
context:
space:
mode:
authorSutou Kouhei <kou@clear-code.com>2020-05-17 11:51:06 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-07-20 02:32:50 +0900
commitb8084b5cb4e20d463938b518dd12f91290c3fb1a (patch)
treeee40d00a219ef8eb92a4194f9697902276a629b3 /test/csv/write
parent5359121a56e90bd4b42a6638046ca34ea72dee8d (diff)
[ruby/csv] Fix a bug that write_nil_value or write_empty_value don't work with non String
GitHub: fix GH-123 Reported by asm256. Thanks!!! https://github.com/ruby/csv/commit/b4492139be
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3332
Diffstat (limited to 'test/csv/write')
-rw-r--r--test/csv/write/test_converters.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/csv/write/test_converters.rb b/test/csv/write/test_converters.rb
index a93b1040ac6..0e0080b4c5c 100644
--- a/test/csv/write/test_converters.rb
+++ b/test/csv/write/test_converters.rb
@@ -20,14 +20,14 @@ module TestCSVWriteConverters
end
def test_nil_value
- assert_equal(%Q[a,NaN,c\n],
- generate_line(["a", nil, "c"],
+ assert_equal(%Q[a,NaN,29\n],
+ generate_line(["a", nil, 29],
write_nil_value: "NaN"))
end
def test_empty_value
- assert_equal(%Q[a,,c\n],
- generate_line(["a", "", "c"],
+ assert_equal(%Q[a,,29\n],
+ generate_line(["a", "", 29],
write_empty_value: nil))
end
end