1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/csv/test_data_converters.rb: use descriptive assertions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-03-01 07:08:19 +00:00
parent 0b8233ab07
commit 2d89896461
7 changed files with 65 additions and 75 deletions

View file

@ -398,23 +398,24 @@ class TestCSV::Table < TestCSV
end
def test_array_delegation
assert(!@table.empty?, "Table was empty.")
assert_not_empty(@table, "Table was empty.")
assert_equal(@rows.size, @table.size)
end
def test_inspect_shows_current_mode
str = @table.inspect
assert(str.include?("mode:#{@table.mode}"), "Mode not shown.")
assert_include(str, "mode:#{@table.mode}", "Mode not shown.")
@table.by_col!
str = @table.inspect
assert(str.include?("mode:#{@table.mode}"), "Mode not shown.")
assert_include(str, "mode:#{@table.mode}", "Mode not shown.")
end
def test_inspect_encoding_is_ascii_compatible
assert( Encoding.compatible?( Encoding.find("US-ASCII"),
@table.inspect.encoding ),
assert_send([Encoding, :compatible?,
Encoding.find("US-ASCII"),
@table.inspect.encoding],
"inspect() was not ASCII compatible." )
end
end