GitLab wurde erfolgreich aktualisiert. Dank regelmäßiger Updates bleibt das THM GitLab sicher und Sie profitieren von den neuesten Funktionen. Danke für Ihre Geduld.

Fixed styling per Rubocop pedantics

parent 443c3aa5
......@@ -119,7 +119,9 @@ def add_column_with_default(table, column, type, default:, allow_null: false)
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 @@ def method_missing(name, *args, &block)
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 @@ def method_missing(name, *args, &block)
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
......
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