From ab177d8cbe3ed208334ce9f550aa7afff65ba334 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 28 Oct 2013 21:48:02 -0700 Subject: Fix broken delete_all test, which will now be failing since #delete_all is broken --- .../test/cases/associations/has_many_associations_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'activerecord/test/cases') diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb index caa916346a..8bdbd84ad1 100644 --- a/activerecord/test/cases/associations/has_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_associations_test.rb @@ -785,10 +785,10 @@ class HasManyAssociationsTest < ActiveRecord::TestCase companies(:first_firm).clients_of_firm.create("name" => "Another Client") clients = companies(:first_firm).clients_of_firm.to_a assert_equal 2, clients.count - deleted = companies(:first_firm).clients_of_firm.delete_all - assert_equal clients.sort_by(&:id), deleted.sort_by(&:id) - assert_equal 0, companies(:first_firm).clients_of_firm.size - assert_equal 0, companies(:first_firm).clients_of_firm(true).size + + assert_difference "Client.count", -(clients.count) do + companies(:first_firm).clients_of_firm.delete_all + end end def test_delete_all_with_not_yet_loaded_association_collection -- cgit v1.2.3