inherit bullet state in nested before(:once)
Change-Id: I1277d7ba47df8f8aa314125aab7bf32512ea807a Reviewed-on: https://gerrit.instructure.com/157074 Tested-by: Jenkins Reviewed-by: James Williams <jamesw@instructure.com> Product-Review: Cody Cutrer <cody@instructure.com> QA-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
parent
dfd60138ae
commit
d8f93be62e
|
@ -495,6 +495,10 @@ RSpec.configure do |config|
|
|||
Onceler.configure do |config|
|
||||
config.before(:record) do
|
||||
Bullet.start_request
|
||||
possible_objects, impossible_objects =
|
||||
onceler.parent&.instance_variable_get(:@bullet_state)
|
||||
possible_objects&.each { |object| Bullet::Detector::NPlusOneQuery.possible_objects.add(object) }
|
||||
impossible_objects&.each { |object| Bullet::Detector::NPlusOneQuery.impossible_objects.add(object) }
|
||||
end
|
||||
|
||||
config.after(:record) do |tape|
|
||||
|
|
Loading…
Reference in New Issue