Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
charkost committed Feb 20, 2025
1 parent 497acb5 commit 1a3c676
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test_queries.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def setup
end

def teardown
Prosopite.allow_stack_paths = nil
Prosopite.allow_stack_paths = []
Prosopite.ignore_queries = nil
Prosopite.enabled = true
end
Expand Down Expand Up @@ -101,9 +101,9 @@ def test_preloader_loop

Prosopite.scan

preloader = ActiveRecord::Associations::Preloader.new
preloader = ActiveRecord::Associations::Preloader
Chair.last(20).map do |chair|
preloader.preload(chair, :legs)
preloader.new(records: [chair], associations: [:legs]).call
chair.legs
end

Expand Down Expand Up @@ -144,7 +144,7 @@ def test_scan_with_block_when_not_enabled
# 20 chairs, 4 legs each
chairs = create_list(:chair, 20)
chairs.each { |c| create_list(:leg, 4, chair: c) }

Prosopite.enabled = false

Prosopite.scan do
Expand Down

0 comments on commit 1a3c676

Please sign in to comment.