提交 4499ab5f 编写于 作者: M Marc-Andre Lafortune

Strengthen test with different nb of rows and columns

上级 39b2cc19
......@@ -5,14 +5,16 @@ class ResultTest < ActiveRecord::TestCase
def result
Result.new(['col_1', 'col_2'], [
['row 1 col 1', 'row 1 col 2'],
['row 2 col 1', 'row 2 col 2']
['row 2 col 1', 'row 2 col 2'],
['row 3 col 1', 'row 3 col 2'],
])
end
def test_to_hash_returns_row_hashes
assert_equal [
{'col_1' => 'row 1 col 1', 'col_2' => 'row 1 col 2'},
{'col_1' => 'row 2 col 1', 'col_2' => 'row 2 col 2'}
{'col_1' => 'row 2 col 1', 'col_2' => 'row 2 col 2'},
{'col_1' => 'row 3 col 1', 'col_2' => 'row 3 col 2'},
], result.to_hash
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册