From 1894682cf799500f3a5f966145924fa0660b71c8 Mon Sep 17 00:00:00 2001 From: Paul Nikitochkin Date: Fri, 5 Jul 2013 02:06:35 +0300 Subject: Cleanup belongs to tests simplified logic to calculate number of queries by using assert_queries --- activerecord/test/cases/associations/belongs_to_associations_test.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'activerecord/test/cases/associations') diff --git a/activerecord/test/cases/associations/belongs_to_associations_test.rb b/activerecord/test/cases/associations/belongs_to_associations_test.rb index 95896971a8..cc72ab7b2a 100644 --- a/activerecord/test/cases/associations/belongs_to_associations_test.rb +++ b/activerecord/test/cases/associations/belongs_to_associations_test.rb @@ -391,8 +391,7 @@ class BelongsToAssociationsTest < ActiveRecord::TestCase def test_dont_find_target_when_foreign_key_is_null tagging = taggings(:thinking_general) - queries = assert_sql { tagging.super_tag } - assert_equal 0, queries.length + assert_queries(0) { tagging.super_tag } end def test_field_name_same_as_foreign_key -- cgit v1.2.3