Class: BugTest
- Inherits:
-
Minitest::Test
- Object
- Minitest::Test
- BugTest
- Defined in:
- build/mongoid-7.3/examples/mongoid_test.rb
Instance Method Summary collapse
Instance Method Details
#test_query_count ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 |
# File 'build/mongoid-7.3/examples/mongoid_test.rb', line 30 def test_query_count p = Person.create!(name: 'arthurnn') Post.create!(person: p) Post.create!(person: p) query_counter = count_queries do Person.includes(:posts).all.to_a end assert_equal 2, query_counter end |