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
Add perform_linear_number_of_queries
rspec matcher
#39
Conversation
a451e61
to
28af9bc
Compare
lib/n_plus_one_control/rspec/matchers/perform_linear_number_of_queries.rb
Outdated
Show resolved
Hide resolved
28af9bc
to
a49a22c
Compare
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.
@palkan I made some changes to remove the intercept. If this approach looks good to you, I'll continue with the failure message and documentation.
lib/n_plus_one_control/rspec/matchers/perform_linear_number_of_queries.rb
Show resolved
Hide resolved
lib/n_plus_one_control/rspec/matchers/perform_linear_number_of_queries.rb
Show resolved
Hide resolved
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.
@caalberts Looks good. Please, go ahead!
lib/n_plus_one_control/rspec/matchers/perform_linear_number_of_queries.rb
Show resolved
Hide resolved
lib/n_plus_one_control/rspec/matchers/perform_linear_number_of_queries.rb
Show resolved
Hide resolved
with_buffer
chain on rspec matcherperform_linear_number_of_queries
rspec matcher
2ca5437
to
9d2a2a9
Compare
@palkan Could you have another look please? |
lib/n_plus_one_control/rspec/matchers/perform_linear_number_of_queries.rb
Show resolved
Hide resolved
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.
Looks good. Thanks!
Left some minor comments.
lib/n_plus_one_control/rspec/matchers/perform_linear_number_of_queries.rb
Show resolved
Hide resolved
@palkan I have made the additional changes. Could you take a look again please? |
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.
Great job 👍
Would you like to add Minitest support as well? Just asking, we can add it later.
And could you please rebase, there is a conflict.
- rspec matcher `perform_linear_number_of_queries`
afc2fc3
to
c4b49f0
Compare
@palkan Rebased.
I'm not very familiar with Minitest. So maybe we can separate it into another PR? |
I started a draft in caalberts#1. I'll move it into this repository after this PR is merged. |
perform_linear_number_of_queries
takes a parameter slope to allow for linear number of queries.What changes did you make? (overview)
Add a rspec matcher
.perform_linear_number_of_queries(slope: 1)
to allow for linear number of queries..Is there anything you'd like reviewers to focus on?
Checklist