未验证 提交 d2d72966 编写于 作者: B bogdanvlviv

Fix stubbed methods in test cases

Remove returning of `false` value for stubbed `lock_thread=` methods
since there aren't any needs in it.

Remove unnecessary returning of `true` for stubbed `drop_database` method.
Follow up #33309.

Related to #33162, #33326.
上级 23f80cee
......@@ -842,7 +842,7 @@ def rollback_transaction(*args); end
end.new
connection.pool = Class.new do
def lock_thread=(lock_thread); false; end
def lock_thread=(lock_thread); end
end.new
connection.expects(:begin_transaction).with(joinable: false)
......@@ -863,7 +863,7 @@ def rollback_transaction(*args)
end.new
connection.pool = Class.new do
def lock_thread=(lock_thread); false; end
def lock_thread=(lock_thread); end
end.new
fire_connection_notification(connection)
......
......@@ -104,7 +104,7 @@ def test_raises_error
class MySQLDBDropTest < ActiveRecord::TestCase
def setup
@connection = Class.new { def drop_database(name); true end }.new
@connection = Class.new { def drop_database(name); end }.new
@configuration = {
"adapter" => "mysql2",
"database" => "my-app-db"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册