rails-bullet

Reducing n+1 queries using the Bullet and RSpec gems

瘦欲@ 提交于 2019-11-26 16:48:01
What is an effective way to use the Bullet Gem with RSpec? Right now I feel if I use it with my current unit test framework I get a lot of notifications or failures of tests because of n+1 queries within the tests themselves that are not related to what happens in my production application, such as checking a value or association. As such, fixing the n+1 failures does not require setting anything on my controllers or models, rather it requires setting something in my test setup to not throw that particular error and I see no real performance improvement on my application. The most effective

Reducing n+1 queries using the Bullet and RSpec gems

北城余情 提交于 2019-11-26 04:56:30
问题 What is an effective way to use the Bullet Gem with RSpec? Right now I feel if I use it with my current unit test framework I get a lot of notifications or failures of tests because of n+1 queries within the tests themselves that are not related to what happens in my production application, such as checking a value or association. As such, fixing the n+1 failures does not require setting anything on my controllers or models, rather it requires setting something in my test setup to not throw