Skip to content
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

Merged
merged 4 commits into from
Jun 14, 2017
Merged

Improve performance and specs #76

merged 4 commits into from
Jun 14, 2017

Conversation

Exelord
Copy link
Owner

@Exelord Exelord commented Jun 11, 2017

This PR will improve performance by reducing possible n-query requests.

FIX: #79

TODO:

  • Tests for AAH new public interface
  • Update docs

@Exelord Exelord changed the title Improve performance and spec Improve performance and specs Jun 11, 2017
@@ -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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✂️

Copy link
Collaborator

@PoslinskiNet PoslinskiNet left a 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 👍 .

@PoslinskiNet
Copy link
Collaborator

@Exelord you can also consider tagging context if you don't want to have after(:context) setup.

@Exelord Exelord merged commit d2d6c7d into master Jun 14, 2017
@Exelord Exelord deleted the improve-specs branch June 14, 2017 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants