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.
This commit is contained in:
bogdanvlviv 2018-07-10 23:31:37 +03:00
parent 23f80cee18
commit d2d72966c3
No known key found for this signature in database
GPG Key ID: E4ACD76A6DB6DFDD
2 changed files with 3 additions and 3 deletions

View File

@ -842,7 +842,7 @@ class TransactionalFixturesOnConnectionNotification < ActiveRecord::TestCase
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 @@ class TransactionalFixturesOnConnectionNotification < ActiveRecord::TestCase
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)

View File

@ -104,7 +104,7 @@ if current_adapter?(:Mysql2Adapter)
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"