diff options
Diffstat (limited to 'activerecord/test')
| -rwxr-xr-x | activerecord/test/associations_test.rb | 4 | ||||
| -rwxr-xr-x | activerecord/test/base_test.rb | 7 | ||||
| -rw-r--r-- | activerecord/test/calculations_test.rb | 4 |
3 files changed, 3 insertions, 12 deletions
diff --git a/activerecord/test/associations_test.rb b/activerecord/test/associations_test.rb index 0db8d91099..607f12bdb5 100755 --- a/activerecord/test/associations_test.rb +++ b/activerecord/test/associations_test.rb @@ -433,9 +433,7 @@ class HasManyAssociationsTest < Test::Unit::TestCase end def test_counting_with_single_conditions - assert_deprecated 'count' do - assert_equal 2, Firm.find(:first).plain_clients.count('1=1') - end + assert_equal 2, Firm.find(:first).plain_clients.count(:conditions => '1=1') end def test_counting_with_single_hash diff --git a/activerecord/test/base_test.rb b/activerecord/test/base_test.rb index 5a224bfbb8..2851665345 100755 --- a/activerecord/test/base_test.rb +++ b/activerecord/test/base_test.rb @@ -1330,11 +1330,8 @@ class BasicsTest < Test::Unit::TestCase def test_count_with_join res = Post.count_by_sql "SELECT COUNT(*) FROM posts LEFT JOIN comments ON posts.id=comments.post_id WHERE posts.#{QUOTED_TYPE} = 'Post'" - res2 = nil - assert_deprecated 'count' do - res2 = Post.count("posts.#{QUOTED_TYPE} = 'Post'", - "LEFT JOIN comments ON posts.id=comments.post_id") - end + + res2 = Post.count(:conditions => "posts.#{QUOTED_TYPE} = 'Post'", :joins => "LEFT JOIN comments ON posts.id=comments.post_id") assert_equal res, res2 res3 = nil diff --git a/activerecord/test/calculations_test.rb b/activerecord/test/calculations_test.rb index bf34beb702..faa86c43f2 100644 --- a/activerecord/test/calculations_test.rb +++ b/activerecord/test/calculations_test.rb @@ -233,10 +233,6 @@ class CalculationsTest < Test::Unit::TestCase assert_equal 4, Account.count(:distinct => true, :include => :firm, :select => :credit_limit) end - def test_deprecated_count_with_string_parameters - assert_deprecated('count') { Account.count('credit_limit > 50') } - end - def test_count_with_no_parameters_isnt_deprecated assert_not_deprecated { Account.count } end |
