From 759d302db851754a73ec4c74e951f8a5faf2bee1 Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Thu, 26 Apr 2012 17:29:22 +0100 Subject: remove deprecate #calculate calls --- .../test/cases/associations/has_many_associations_test.rb | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'activerecord/test/cases/associations/has_many_associations_test.rb') diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb index af730202c4..321dae4143 100644 --- a/activerecord/test/cases/associations/has_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_associations_test.rb @@ -249,16 +249,8 @@ class HasManyAssociationsTest < ActiveRecord::TestCase assert_equal 2, Firm.find(:first, :order => "id").plain_clients.count end - def test_counting_with_empty_hash_conditions - assert_equal 2, Firm.find(:first, :order => "id").plain_clients.count(:conditions => {}) - end - - def test_counting_with_single_conditions - assert_equal 1, Firm.find(:first, :order => "id").plain_clients.count(:conditions => ['name=?', "Microsoft"]) - end - def test_counting_with_single_hash - assert_equal 1, Firm.find(:first, :order => "id").plain_clients.count(:conditions => {:name => "Microsoft"}) + assert_equal 1, Firm.find(:first, :order => "id").plain_clients.where(:name => "Microsoft").count end def test_counting_with_column_name_and_hash -- cgit v1.2.3