提交 09969753 编写于 作者: Y yui-knk

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`.
上级 3cbaeb16
......@@ -132,13 +132,9 @@ def test_create_table_with_force_true_does_not_drop_nonexisting_table
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册