diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2010-01-19 23:11:54 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-01-19 23:11:54 +0530 |
commit | 9acf0af544f2f5dcaf257bdc25047017c972ffce (patch) | |
tree | b43c0c62af736237fa4d328cbc3e038155801ea6 /activerecord/test | |
parent | dbce07b81d24a991ddd29b91f9c358b1f236bda2 (diff) | |
download | rails-9acf0af544f2f5dcaf257bdc25047017c972ffce.tar.gz rails-9acf0af544f2f5dcaf257bdc25047017c972ffce.tar.bz2 rails-9acf0af544f2f5dcaf257bdc25047017c972ffce.zip |
Remove Relation#where_clause
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/method_scoping_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/cases/method_scoping_test.rb b/activerecord/test/cases/method_scoping_test.rb index 7ca5b5a988..fbd1adf088 100644 --- a/activerecord/test/cases/method_scoping_test.rb +++ b/activerecord/test/cases/method_scoping_test.rb @@ -11,7 +11,7 @@ class MethodScopingTest < ActiveRecord::TestCase def test_set_conditions Developer.send(:with_scope, :find => { :conditions => 'just a test...' }) do - assert_equal '(just a test...)', Developer.scoped.send(:where_clause) + assert_equal '(just a test...)', Developer.scoped.arel.send(:where_clauses).join(' AND ') end end @@ -257,7 +257,7 @@ class NestedScopingTest < ActiveRecord::TestCase Developer.send(:with_scope, :find => { :conditions => 'salary = 80000' }) do Developer.send(:with_scope, :find => { :limit => 10 }) do devs = Developer.scoped - assert_equal '(salary = 80000)', devs.send(:where_clause) + assert_equal '(salary = 80000)', devs.arel.send(:where_clauses).join(' AND ') assert_equal 10, devs.taken end end @@ -285,7 +285,7 @@ class NestedScopingTest < ActiveRecord::TestCase Developer.send(:with_scope, :find => { :conditions => "name = 'David'" }) do Developer.send(:with_scope, :find => { :conditions => 'salary = 80000' }) do devs = Developer.scoped - assert_equal "(name = 'David') AND (salary = 80000)", devs.send(:where_clause) + assert_equal "(name = 'David') AND (salary = 80000)", devs.arel.send(:where_clauses).join(' AND ') assert_equal(1, Developer.count) end Developer.send(:with_scope, :find => { :conditions => "name = 'Maiha'" }) do @@ -298,7 +298,7 @@ class NestedScopingTest < ActiveRecord::TestCase Developer.send(:with_scope, :find => { :conditions => 'salary = 80000', :limit => 10 }) do Developer.send(:with_scope, :find => { :conditions => "name = 'David'" }) do devs = Developer.scoped - assert_equal "(salary = 80000) AND (name = 'David')", devs.send(:where_clause) + assert_equal "(salary = 80000) AND (name = 'David')", devs.arel.send(:where_clauses).join(' AND ') assert_equal 10, devs.taken end end |