Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add ROWNUM to test first and last to support Oracle.

  • Loading branch information...
commit 3937d443d6a491df4a66d267527462f97c37759f 1 parent 2b354fe
@yahonda yahonda authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/test/cases/finder_test.rb
View
4 activerecord/test/cases/finder_test.rb
@@ -253,8 +253,8 @@ def test_model_class_responds_to_last_bang
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
Please sign in to comment.
Something went wrong with that request. Please try again.