summaryrefslogtreecommitdiff
path: root/test/csv
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-17 07:03:44 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-17 07:03:44 +0000
commitc1d0768f349586cb62f06a5fbe84f408c5f3619a (patch)
tree7d623f965505290918b4038308a2121625be5a7a /test/csv
parent7735e2da11ecabdf27b71b8f3c3a240ee955b8df (diff)
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
Diffstat (limited to 'test/csv')
-rwxr-xr-xtest/csv/test_features.rb18
1 files changed, 8 insertions, 10 deletions
diff --git a/test/csv/test_features.rb b/test/csv/test_features.rb
index 6b73093..6dc6d34 100755
--- a/test/csv/test_features.rb
+++ b/test/csv/test_features.rb
@@ -304,19 +304,17 @@ class TestCSV::Features < TestCSV
end
def test_inspect_shows_headers_when_available
- CSV.new("one,two,three\n1,2,3\n", headers: true) do |csv|
- assert_include(csv.inspect, "headers:true", "Header hint not shown.")
- csv.shift # load headers
- assert_match(/headers:\[[^\]]+\]/, csv.inspect)
- end
+ csv = CSV.new("one,two,three\n1,2,3\n", headers: true)
+ assert_include(csv.inspect, "headers:true", "Header hint not shown.")
+ csv.shift # load headers
+ assert_match(/headers:\[[^\]]+\]/, csv.inspect)
end
def test_inspect_encoding_is_ascii_compatible
- CSV.new("one,two,three\n1,2,3\n".encode("UTF-16BE")) do |csv|
- assert_send([Encoding, :compatible?,
- Encoding.find("US-ASCII"), csv.inspect.encoding],
- "inspect() was not ASCII compatible.")
- end
+ csv = CSV.new("one,two,three\n1,2,3\n".encode("UTF-16BE"))
+ assert_send([Encoding, :compatible?,
+ Encoding.find("US-ASCII"), csv.inspect.encoding],
+ "inspect() was not ASCII compatible.")
end
def test_version