Permalink
Browse files

Strengthen test with different nb of rows and columns

  • Loading branch information...
1 parent 39b2cc1 commit 4499ab5fdeca46416cfc4a50a376eba4eb8e16b4 @marcandre marcandre committed Feb 4, 2014
Showing with 4 additions and 2 deletions.
  1. +4 −2 activerecord/test/cases/result_test.rb
@@ -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

0 comments on commit 4499ab5

Please sign in to comment.