summaryrefslogtreecommitdiff
path: root/test/csv/test_table.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-01 07:08:19 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-01 07:08:19 +0000
commit2d89896461cdea858bb3f6037e0357bf95c5330f (patch)
tree4f6577426e2a184b180f79c0a6cf0644fde7a911 /test/csv/test_table.rb
parent0b8233ab07a9bfc2c100f395031adfef23c8b491 (diff)
* 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
Diffstat (limited to 'test/csv/test_table.rb')
-rwxr-xr-xtest/csv/test_table.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/csv/test_table.rb b/test/csv/test_table.rb
index 318825f2b1..ec710d30cc 100755
--- a/test/csv/test_table.rb
+++ b/test/csv/test_table.rb
@@ -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