Fixed styling per Rubocop pedantics

This commit is contained in:
Yorick Peterse 2016-05-11 14:11:04 +02:00
parent 443c3aa597
commit 36083b4d0e
No known key found for this signature in database
GPG Key ID: EDD30D2BEB691AC9
2 changed files with 7 additions and 5 deletions

View File

@ -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

View File

@ -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