test/csv/test_features.rb: enable accidentally-disabled assertions

CSV.new does not yield the instance.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2018-04-17 07:03:44 +00:00
Родитель 7735e2da11
Коммит c1d0768f34
1 изменённых файлов: 8 добавлений и 10 удалений

Просмотреть файл

@ -304,19 +304,17 @@ class TestCSV::Features < TestCSV
end end
def test_inspect_shows_headers_when_available def test_inspect_shows_headers_when_available
CSV.new("one,two,three\n1,2,3\n", headers: true) do |csv| csv = CSV.new("one,two,three\n1,2,3\n", headers: true)
assert_include(csv.inspect, "headers:true", "Header hint not shown.") assert_include(csv.inspect, "headers:true", "Header hint not shown.")
csv.shift # load headers csv.shift # load headers
assert_match(/headers:\[[^\]]+\]/, csv.inspect) assert_match(/headers:\[[^\]]+\]/, csv.inspect)
end
end end
def test_inspect_encoding_is_ascii_compatible def test_inspect_encoding_is_ascii_compatible
CSV.new("one,two,three\n1,2,3\n".encode("UTF-16BE")) do |csv| csv = CSV.new("one,two,three\n1,2,3\n".encode("UTF-16BE"))
assert_send([Encoding, :compatible?, assert_send([Encoding, :compatible?,
Encoding.find("US-ASCII"), csv.inspect.encoding], Encoding.find("US-ASCII"), csv.inspect.encoding],
"inspect() was not ASCII compatible.") "inspect() was not ASCII compatible.")
end
end end
def test_version def test_version