Commit 94c08daf authored by Stan Hu's avatar Stan Hu

Merge branch 'ld-fix-broken-master-bulk-insert-safe-shared-examples' into 'master'

Call .dup in test to fix broken master

See merge request gitlab-org/gitlab!25070
parents b6a3bd97 53e67cc1
# frozen_string_literal: true # frozen_string_literal: true
RSpec.shared_examples 'a BulkInsertSafe model' do |target_class| RSpec.shared_examples 'a BulkInsertSafe model' do |klass|
# Call `.dup` on the class passed in, as a test in this set of examples
# calls `belongs_to` on the class, thereby adding a new belongs_to
# relationship to the model that can break remaining specs in the test suite.
let(:target_class) { klass.dup }
# We consider all callbacks unsafe for bulk insertions unless we have explicitly # We consider all callbacks unsafe for bulk insertions unless we have explicitly
# whitelisted them (esp. anything related to :save, :create, :commit etc.) # whitelisted them (esp. anything related to :save, :create, :commit etc.)
let(:callback_method_blacklist) do let(:callback_method_blacklist) do
......
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