Merge pull request #33336 from bogdanvlviv/fix-stubbed-methods-in-test-cases
Fix stubbed methods in test cases
This commit is contained in:
commit
7fc499d135
|
@ -842,7 +842,7 @@ class TransactionalFixturesOnConnectionNotification < ActiveRecord::TestCase
|
||||||
end.new
|
end.new
|
||||||
|
|
||||||
connection.pool = Class.new do
|
connection.pool = Class.new do
|
||||||
def lock_thread=(lock_thread); false; end
|
def lock_thread=(lock_thread); end
|
||||||
end.new
|
end.new
|
||||||
|
|
||||||
connection.expects(:begin_transaction).with(joinable: false)
|
connection.expects(:begin_transaction).with(joinable: false)
|
||||||
|
@ -863,7 +863,7 @@ class TransactionalFixturesOnConnectionNotification < ActiveRecord::TestCase
|
||||||
end.new
|
end.new
|
||||||
|
|
||||||
connection.pool = Class.new do
|
connection.pool = Class.new do
|
||||||
def lock_thread=(lock_thread); false; end
|
def lock_thread=(lock_thread); end
|
||||||
end.new
|
end.new
|
||||||
|
|
||||||
fire_connection_notification(connection)
|
fire_connection_notification(connection)
|
||||||
|
|
|
@ -104,7 +104,7 @@ if current_adapter?(:Mysql2Adapter)
|
||||||
|
|
||||||
class MySQLDBDropTest < ActiveRecord::TestCase
|
class MySQLDBDropTest < ActiveRecord::TestCase
|
||||||
def setup
|
def setup
|
||||||
@connection = Class.new { def drop_database(name); true end }.new
|
@connection = Class.new { def drop_database(name); end }.new
|
||||||
@configuration = {
|
@configuration = {
|
||||||
"adapter" => "mysql2",
|
"adapter" => "mysql2",
|
||||||
"database" => "my-app-db"
|
"database" => "my-app-db"
|
||||||
|
|
Loading…
Reference in New Issue