Fixed styling per Rubocop pedantics
This commit is contained in:
parent
443c3aa597
commit
36083b4d0e
|
@ -119,7 +119,9 @@ module Gitlab
|
||||||
transaction do
|
transaction do
|
||||||
update_column_in_batches(table, column, default)
|
update_column_in_batches(table, column, default)
|
||||||
end
|
end
|
||||||
rescue Exception => error
|
# We want to rescue _all_ exceptions here, even those that don't inherit
|
||||||
|
# from StandardError.
|
||||||
|
rescue Exception => error # rubocop: disable all
|
||||||
remove_column(table, column)
|
remove_column(table, column)
|
||||||
|
|
||||||
raise error
|
raise error
|
||||||
|
|
|
@ -105,9 +105,9 @@ describe Gitlab::Database::MigrationHelpers, lib: true do
|
||||||
expect(model).to receive(:remove_column).
|
expect(model).to receive(:remove_column).
|
||||||
with(:projects, :foo)
|
with(:projects, :foo)
|
||||||
|
|
||||||
expect {
|
expect do
|
||||||
model.add_column_with_default(:projects, :foo, :integer, default: 10)
|
model.add_column_with_default(:projects, :foo, :integer, default: 10)
|
||||||
}.to raise_error(RuntimeError)
|
end.to raise_error(RuntimeError)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -115,9 +115,9 @@ describe Gitlab::Database::MigrationHelpers, lib: true do
|
||||||
it 'raises RuntimeError' do
|
it 'raises RuntimeError' do
|
||||||
expect(model).to receive(:transaction_open?).and_return(true)
|
expect(model).to receive(:transaction_open?).and_return(true)
|
||||||
|
|
||||||
expect {
|
expect do
|
||||||
model.add_column_with_default(:projects, :foo, :integer, default: 10)
|
model.add_column_with_default(:projects, :foo, :integer, default: 10)
|
||||||
}.to raise_error(RuntimeError)
|
end.to raise_error(RuntimeError)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue