diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-09-07 10:22:39 -0700 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-09-07 10:22:39 -0700 |
commit | 9dd5c0391986cae96d9399f3f51f0fccb95bee71 (patch) | |
tree | 7bae4d4cc8a37df9db8f541d40a6678c8d07df79 | |
parent | f6709523da4ddbe15e7b1db557b9170815d51007 (diff) | |
parent | 3937d443d6a491df4a66d267527462f97c37759f (diff) | |
download | rails-9dd5c0391986cae96d9399f3f51f0fccb95bee71.tar.gz rails-9dd5c0391986cae96d9399f3f51f0fccb95bee71.tar.bz2 rails-9dd5c0391986cae96d9399f3f51f0fccb95bee71.zip |
Merge pull request #2914 from yahonda/add_rownum_to_test_first_and_last
Add ROWNUM to test first and last to support Oracle.
-rw-r--r-- | activerecord/test/cases/finder_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb index 47bf2d007f..3088ab012f 100644 --- a/activerecord/test/cases/finder_test.rb +++ b/activerecord/test/cases/finder_test.rb @@ -253,8 +253,8 @@ class FinderTest < ActiveRecord::TestCase end def test_first_and_last_with_integer_should_use_sql_limit - assert_sql(/LIMIT 2/) { Topic.first(2).entries } - assert_sql(/LIMIT 5/) { Topic.last(5).entries } + assert_sql(/LIMIT 2|ROWNUM <= 2/) { Topic.first(2).entries } + assert_sql(/LIMIT 5|ROWNUM <= 5/) { Topic.last(5).entries } end def test_last_with_integer_and_order_should_keep_the_order |