BigW Consortium Gitlab

Commit 13bf6126 by Grzegorz Bizon

Test migration helpers using a migration class

parent 529c5821
......@@ -2,15 +2,13 @@ require 'spec_helper'
describe Gitlab::Database::MigrationHelpers, lib: true do
let(:model) do
Class.new do
include Gitlab::Database::MigrationHelpers
def method_missing(name, *args, &block)
ActiveRecord::Base.connection.send(name, *args, &block)
end
end.new
ActiveRecord::Migration.new.extend(
Gitlab::Database::MigrationHelpers
)
end
before { allow(model).to receive(:puts) }
describe '#add_concurrent_index' do
context 'outside a transaction' do
before do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment