-
Notifications
You must be signed in to change notification settings - Fork 0
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
Validation and Specs #3
Conversation
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.
STATUS: Changes Required ♻️
Hi @GeekyHacks , 👋
Good job so far!
There are some issues that you still need to work on to go to the next project but you are almost there!
To Highlight 🥇
✅ Descriptive Pull Request title and summary. ✔️
✅ Good use of Github flow ✔️
✅All linters are checked.
✅Project is professionally documented.
✅The right GitHub flow method has been used.
✅Professional pull request title and description.
Changes Required
- Please check the comments under the review.
Optional suggestions
Every comment with the [OPTIONAL] prefix won't stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better. Some of them were simply missed by the previous reviewer and addressing them will really improve your application.
Please don't open the new PR, please make the above changes in this branch and submit this same PR NalianAchei2020/Hello_Microverse#1 for getting another review.
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me on( @Adebowale ) in your question so I can receive the notification.
As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.
app/models/like.rb
Outdated
class Like < ApplicationRecord | ||
belongs_to :user | ||
belongs_to :post | ||
|
||
after_save :update_comments_counter |
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 on your project ,you have done a great job so far but there are still some isues you still need to address ,please kindly add Rspect unit test that describe the like ,as you can see acccording to the project requirement its mandatory that Any custom methods in the models should have a corresponding unit test.
app/models/comment.rb
Outdated
class Comment < ApplicationRecord | ||
belongs_to :user | ||
belongs_to :post | ||
|
||
after_save :update_comments_counter |
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 on your project, you have done a great job so far, but there are still some issues you still need to address, please kindly add the Rspect unit test that describes the Comment, as you can see according to the project requirement it is mandatory that Any custom methods in the models should have a corresponding unit test.kindly add unit specs for all of your models' methods consequently each model should have a corresponding unit test
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.
Hi @GeekyHacks,
Your project is complete! There is nothing else to say other than... it's time to merge it
Congratulations! 🎉
Highlights
- All tests are passing ✔️
- Correct Gitflow ✔️
- No linters errors ✔️
Optional suggestions
Every comment with the [OPTIONAL] prefix won't stop the approval of this PR. However, I strongly recommend you take them into account as they can make your code better. Some of them were missed by the previous reviewer and addressing them will really improve your application.
Cheers, and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please remember to tag me in your question so I can receive the notification.
As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think the code review was unfair, you can request a second opinion using this form.
|
||
# context '#update_likes_counter' do | ||
# before :each do | ||
# 8.times { Like.create(user: @user, post: @post) } | ||
# end | ||
|
||
# it 'keeps track of likes and equals 8' do | ||
# expect(@post.likes_counter).to eq 8 | ||
# end | ||
# end |
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.
- [OPTIONAL] Kindly delete the commented line of code to keep your code clean and professional 😁 😁
In the following PR I did the following:
bundler i
thenbin/rails g rspec:install
after adding the Rspec gemgem 'rspec-rails'
to the gemfilerspec
and got all passed