Fixed styling per Rubocop pedantics
This commit is contained in:
parent
443c3aa597
commit
36083b4d0e
|
@ -119,7 +119,9 @@ module Gitlab
|
|||
transaction do
|
||||
update_column_in_batches(table, column, default)
|
||||
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)
|
||||
|
||||
raise error
|
||||
|
|
|
@ -105,9 +105,9 @@ describe Gitlab::Database::MigrationHelpers, lib: true do
|
|||
expect(model).to receive(:remove_column).
|
||||
with(:projects, :foo)
|
||||
|
||||
expect {
|
||||
expect do
|
||||
model.add_column_with_default(:projects, :foo, :integer, default: 10)
|
||||
}.to raise_error(RuntimeError)
|
||||
end.to raise_error(RuntimeError)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -115,9 +115,9 @@ describe Gitlab::Database::MigrationHelpers, lib: true do
|
|||
it 'raises RuntimeError' do
|
||||
expect(model).to receive(:transaction_open?).and_return(true)
|
||||
|
||||
expect {
|
||||
expect do
|
||||
model.add_column_with_default(:projects, :foo, :integer, default: 10)
|
||||
}.to raise_error(RuntimeError)
|
||||
end.to raise_error(RuntimeError)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue