diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2011-09-05 15:41:59 -0700 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-09-05 15:41:59 -0700 |
commit | 164382003c02294950ff227649cf97fb1eb452e8 (patch) | |
tree | a8e81716ad8774212f3b9e5db5dd19269de8dc52 /activerecord/test | |
parent | 6d93f70c58ca1a1ee3d561421c1d2c12b4cb1cea (diff) | |
parent | 51da1e5c65d65208f8be9c4e6de7e9eed4b621c6 (diff) | |
download | rails-164382003c02294950ff227649cf97fb1eb452e8.tar.gz rails-164382003c02294950ff227649cf97fb1eb452e8.tar.bz2 rails-164382003c02294950ff227649cf97fb1eb452e8.zip |
Merge pull request #2877 from dmathieu/fix_tests_pg_18
Last orders the records by id
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/named_scope_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/named_scope_test.rb b/activerecord/test/cases/named_scope_test.rb index ed0240cada..17ff765543 100644 --- a/activerecord/test/cases/named_scope_test.rb +++ b/activerecord/test/cases/named_scope_test.rb @@ -181,8 +181,8 @@ class NamedScopeTest < ActiveRecord::TestCase 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 |