summaryrefslogtreecommitdiff
path: root/spec/support/helpers/migrations_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/helpers/migrations_helpers.rb')
-rw-r--r--spec/support/helpers/migrations_helpers.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/support/helpers/migrations_helpers.rb b/spec/support/helpers/migrations_helpers.rb
index e1d28a807e3..6fc5904fc83 100644
--- a/spec/support/helpers/migrations_helpers.rb
+++ b/spec/support/helpers/migrations_helpers.rb
@@ -104,7 +104,7 @@ module MigrationsHelpers
# We stub this way because we can't stub on
# `current_application_settings` due to `method_missing` is
# depending on current_application_settings...
- allow(ActiveRecord::Base.connection)
+ allow(Gitlab::Database::Migration::V1_0::MigrationRecord.connection)
.to receive(:active?)
.and_return(false)
allow(Gitlab::Runtime)
@@ -158,10 +158,10 @@ module MigrationsHelpers
end
def migrate!
- open_transactions = ActiveRecord::Base.connection.open_transactions
+ open_transactions = Gitlab::Database::Migration::V1_0::MigrationRecord.connection.open_transactions
allow_next_instance_of(described_class) do |migration|
allow(migration).to receive(:transaction_open?) do
- ActiveRecord::Base.connection.open_transactions > open_transactions
+ Gitlab::Database::Migration::V1_0::MigrationRecord.connection.open_transactions > open_transactions
end
end