From a0550aee11f0c849c071f65c94d7442ef84c4ed9 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Fri, 4 Oct 2019 15:53:13 +0900 Subject: [PATCH] Remove unused block local var `cli` --- .../test/cases/associations/has_many_associations_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb index b92b05a7d5..98808e658a 100644 --- a/activerecord/test/cases/associations/has_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_associations_test.rb @@ -2499,7 +2499,7 @@ class HasManyAssociationsTest < ActiveRecord::TestCase test "first_or_initialize adds the record to the association" do firm = Firm.create! name: "omg" - client = firm.clients_of_firm.where(name: "lol").first_or_initialize do |cli| + client = firm.clients_of_firm.where(name: "lol").first_or_initialize do assert_deprecated do assert_equal 0, Client.count end @@ -2510,7 +2510,7 @@ class HasManyAssociationsTest < ActiveRecord::TestCase test "first_or_create adds the record to the association" do firm = Firm.create! name: "omg" firm.clients_of_firm.load_target - client = firm.clients_of_firm.where(name: "lol").first_or_create do |cli| + client = firm.clients_of_firm.where(name: "lol").first_or_create do assert_deprecated do assert_equal 0, Client.count end @@ -2522,7 +2522,7 @@ class HasManyAssociationsTest < ActiveRecord::TestCase test "first_or_create! adds the record to the association" do firm = Firm.create! name: "omg" firm.clients_of_firm.load_target - client = firm.clients_of_firm.where(name: "lol").first_or_create! do |cli| + client = firm.clients_of_firm.where(name: "lol").first_or_create! do assert_deprecated do assert_equal 0, Client.count end