diff options
author | Yasuo Honda <yasuo.honda@gmail.com> | 2011-09-07 07:40:55 -0400 |
---|---|---|
committer | Yasuo Honda <yasuo.honda@gmail.com> | 2011-09-07 07:40:55 -0400 |
commit | 3937d443d6a491df4a66d267527462f97c37759f (patch) | |
tree | 00c48aa264147f57c632f0d405a7721619e8408f /activerecord/test | |
parent | 2b354fed34ba78797c9fbe1d0f29c0337f9f6411 (diff) | |
download | rails-3937d443d6a491df4a66d267527462f97c37759f.tar.gz rails-3937d443d6a491df4a66d267527462f97c37759f.tar.bz2 rails-3937d443d6a491df4a66d267527462f97c37759f.zip |
Add ROWNUM to test first and last to support Oracle.
Diffstat (limited to 'activerecord/test')
-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 |