Commit 13bf6126 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Test migration helpers using a migration class

parent 529c5821
...@@ -2,15 +2,13 @@ require 'spec_helper' ...@@ -2,15 +2,13 @@ require 'spec_helper'
describe Gitlab::Database::MigrationHelpers, lib: true do describe Gitlab::Database::MigrationHelpers, lib: true do
let(:model) do let(:model) do
Class.new do ActiveRecord::Migration.new.extend(
include Gitlab::Database::MigrationHelpers Gitlab::Database::MigrationHelpers
)
def method_missing(name, *args, &block)
ActiveRecord::Base.connection.send(name, *args, &block)
end
end.new
end end
before { allow(model).to receive(:puts) }
describe '#add_concurrent_index' do describe '#add_concurrent_index' do
context 'outside a transaction' do context 'outside a transaction' do
before 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