diff --git a/activerecord/test/cases/associations/has_one_through_disable_joins_associations_test.rb b/activerecord/test/cases/associations/has_one_through_disable_joins_associations_test.rb index 111e30ad61..55ca9a6ec4 100644 --- a/activerecord/test/cases/associations/has_one_through_disable_joins_associations_test.rb +++ b/activerecord/test/cases/associations/has_one_through_disable_joins_associations_test.rb @@ -76,6 +76,6 @@ class HasOneThroughDisableJoinsAssociationsTest < ActiveRecord::TestCase assert_no_match(/INNER JOIN/, nj) end - assert_match(/#{Regexp.escape(connection.quote_table_name('memberships.type'))}/, no_joins.first) + assert_match(/#{Regexp.escape(Member.connection.quote_table_name('memberships.type'))}/, no_joins.first) end end