-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve performance and specs #76
Conversation
@@ -92,4 +92,5 @@ | |||
# # test failures related to randomization by passing the same `--seed` value | |||
# # as the one that triggered the failure. | |||
# Kernel.srand config.seed | |||
# ActiveRecord::Base.logger = Logger.new(STDOUT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In most cases, you check 1 DB query count (with 2 exceptions) after the context. You simplify it and use it globally after a little spec change (those 2 exceptions) with after context callback: https://relishapp.com/rspec/rspec-core/docs/hooks/before-and-after-hooks. However, great refactor 👍 .
@Exelord you can also consider tagging context if you don't want to have after(:context) setup. |
This PR will improve performance by reducing possible n-query requests.
FIX: #79
TODO: