Reducing n+1 queries using the Bullet and RSpec gems
The most effective way is not at all. There may be some legitimate advantages to reducing n+1 queries in tests, most obviously to speed up overall execution time. It is quite possible, however, that you are either testing too much or making less significant gains than what is possible. I also usually find it unappealing … Read more