ruby-changes:50965
From: mame <ko1@a...>
Date: Tue, 17 Apr 2018 16:03:50 +0900 (JST)
Subject: [ruby-changes:50965] mame:r63172 (trunk): test/csv/test_features.rb: enable accidentally-disabled assertions
mame 2018-04-17 16:03:44 +0900 (Tue, 17 Apr 2018) New Revision: 63172 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63172 Log: test/csv/test_features.rb: enable accidentally-disabled assertions CSV.new does not yield the instance. Modified files: trunk/test/csv/test_features.rb Index: test/csv/test_features.rb =================================================================== --- test/csv/test_features.rb (revision 63171) +++ test/csv/test_features.rb (revision 63172) @@ -304,19 +304,17 @@ class TestCSV::Features < TestCSV https://github.com/ruby/ruby/blob/trunk/test/csv/test_features.rb#L304 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/