Permalink
Browse files

Merge pull request #2877 from dmathieu/fix_tests_pg_18

Last orders the records by id
  • Loading branch information...
2 parents 6d93f70 + 51da1e5 commit 164382003c02294950ff227649cf97fb1eb452e8 @spastorino spastorino committed Sep 5, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/test/cases/named_scope_test.rb
View
4 activerecord/test/cases/named_scope_test.rb
@@ -181,8 +181,8 @@ def test_first_and_last_should_support_find_options
end
def test_first_and_last_should_allow_integers_for_limit
- assert_equal Topic.base.first(2), Topic.base.to_a.first(2)
- assert_equal Topic.base.last(2), Topic.base.to_a.last(2)
+ assert_equal Topic.base.first(2), Topic.base.order("id").to_a.first(2)
+ assert_equal Topic.base.last(2), Topic.base.order("id").to_a.last(2)
end
def test_first_and_last_should_not_use_query_when_results_are_loaded

0 comments on commit 1643820

Please sign in to comment.