From 09969753195e988fff1546e5bdef940550f39e20 Mon Sep 17 00:00:00 2001 From: yui-knk Date: Sun, 23 Aug 2015 22:59:24 +0900 Subject: Remove test helper method to inside test method Remove `MigrationTest#connection` and write `ActiveRecord::Base.connection` directly to test, because `MigrationTest#connection` is only used in `test_migration_instance_has_connection`. --- activerecord/test/cases/migration_test.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'activerecord/test') diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb index b2f209fe97..11e42f28dc 100644 --- a/activerecord/test/cases/migration_test.rb +++ b/activerecord/test/cases/migration_test.rb @@ -132,13 +132,9 @@ class MigrationTest < ActiveRecord::TestCase Person.connection.drop_table :testings2, if_exists: true end - def connection - ActiveRecord::Base.connection - end - def test_migration_instance_has_connection migration = Class.new(ActiveRecord::Migration).new - assert_equal connection, migration.connection + assert_equal ActiveRecord::Base.connection, migration.connection end def test_method_missing_delegates_to_connection -- cgit v1.2.3