Skip to content
Browse files

do not rely on method_missing hitting arel

arel methods are not supposed to be public API for ActiveRecord
  • Loading branch information...
1 parent c7191e3 commit f72058a94d8ebbcaf3b8ef0b36dfa1acb64fa8f0 @tenderlove tenderlove committed Mar 24, 2014
Showing with 3 additions and 2 deletions.
  1. +3 −2 activerecord/test/cases/scoping/relation_scoping_test.rb
View
5 activerecord/test/cases/scoping/relation_scoping_test.rb
@@ -192,8 +192,9 @@ def test_merge_options
Developer.where('salary = 80000').scoping do
Developer.limit(10).scoping do
devs = Developer.all
- assert_match '(salary = 80000)', devs.to_sql
- assert_equal 10, devs.taken
+ sql = devs.to_sql
+ assert_match '(salary = 80000)', sql
+ assert_match 'LIMIT 10', sql
end
end
end

0 comments on commit f72058a

Please sign in to comment.
Something went wrong with that request. Please try again.