aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/result_test.rb
diff options
context:
space:
mode:
authorMarc-Andre Lafortune <github@marc-andre.ca>2014-02-04 01:47:40 -0500
committerMarc-Andre Lafortune <github@marc-andre.ca>2014-02-05 16:45:56 -0500
commit4499ab5fdeca46416cfc4a50a376eba4eb8e16b4 (patch)
tree040d5465b0e91af731f019047218a6e074b27218 /activerecord/test/cases/result_test.rb
parent39b2cc1900b0cb10057d46d7e2ed54f8e0b1e26f (diff)
downloadrails-4499ab5fdeca46416cfc4a50a376eba4eb8e16b4.tar.gz
rails-4499ab5fdeca46416cfc4a50a376eba4eb8e16b4.tar.bz2
rails-4499ab5fdeca46416cfc4a50a376eba4eb8e16b4.zip
Strengthen test with different nb of rows and columns
Diffstat (limited to 'activerecord/test/cases/result_test.rb')
-rw-r--r--activerecord/test/cases/result_test.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/test/cases/result_test.rb b/activerecord/test/cases/result_test.rb
index b6c583dbf5..edaeb85211 100644
--- a/activerecord/test/cases/result_test.rb
+++ b/activerecord/test/cases/result_test.rb
@@ -5,14 +5,16 @@ module ActiveRecord
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