Skip to content
This repository
Browse code

Merge pull request #2877 from dmathieu/fix_tests_pg_18

Last orders the records by id
  • Loading branch information...
commit d194397d1e0657384f6d0bea4cd6d96097a036b4 1 parent c33b7c4
Santiago Pastorino authored September 05, 2011
4  activerecord/test/cases/named_scope_test.rb
@@ -181,8 +181,8 @@ def test_first_and_last_should_support_find_options
181 181
   end
182 182
 
183 183
   def test_first_and_last_should_allow_integers_for_limit
184  
-    assert_equal Topic.base.first(2), Topic.base.to_a.first(2)
185  
-    assert_equal Topic.base.last(2), Topic.base.to_a.last(2)
  184
+    assert_equal Topic.base.first(2), Topic.base.order("id").to_a.first(2)
  185
+    assert_equal Topic.base.last(2), Topic.base.order("id").to_a.last(2)
186 186
   end
187 187
 
188 188
   def test_first_and_last_should_not_use_query_when_results_are_loaded

0 notes on commit d194397

Please sign in to comment.
Something went wrong with that request. Please try again.