Skip to content

Commit 1a3c676

Browse files
committed
Fix tests
1 parent 497acb5 commit 1a3c676

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/test_queries.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def setup
66
end
77

88
def teardown
9-
Prosopite.allow_stack_paths = nil
9+
Prosopite.allow_stack_paths = []
1010
Prosopite.ignore_queries = nil
1111
Prosopite.enabled = true
1212
end
@@ -101,9 +101,9 @@ def test_preloader_loop
101101

102102
Prosopite.scan
103103

104-
preloader = ActiveRecord::Associations::Preloader.new
104+
preloader = ActiveRecord::Associations::Preloader
105105
Chair.last(20).map do |chair|
106-
preloader.preload(chair, :legs)
106+
preloader.new(records: [chair], associations: [:legs]).call
107107
chair.legs
108108
end
109109

@@ -144,7 +144,7 @@ def test_scan_with_block_when_not_enabled
144144
# 20 chairs, 4 legs each
145145
chairs = create_list(:chair, 20)
146146
chairs.each { |c| create_list(:leg, 4, chair: c) }
147-
147+
148148
Prosopite.enabled = false
149149

150150
Prosopite.scan do

0 commit comments

Comments
 (0)