Commit 36083b4d authored by Yorick Peterse's avatar Yorick Peterse

Fixed styling per Rubocop pedantics

parent 443c3aa5
...@@ -119,7 +119,9 @@ module Gitlab ...@@ -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 ...@@ -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 ...@@ -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
......
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