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

Validation and Specs #3

Merged
merged 14 commits into from
Nov 18, 2023
Merged

Validation and Specs #3

merged 14 commits into from
Nov 18, 2023

Conversation

GeekyHacks
Copy link
Owner

In the following PR I did the following:

  • SetUp the project for Rspec testing running bundler i then bin/rails g rspec:install after adding the Rspec gem gem 'rspec-rails' to the gemfile
  • Added the spec test cases then adding the validations to the User and Post models
  • Tested all test cases with rspec and got all passed
  • Fixed linter errors

Copy link

@ademibowale ademibowale left a 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!

image

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.

⚠️⚠️ Important Note ⚠️⚠️
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.

Comment on lines 1 to 5
class Like < ApplicationRecord
belongs_to :user
belongs_to :post

after_save :update_comments_counter

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.

Comment on lines 1 to 5
class Comment < ApplicationRecord
belongs_to :user
belongs_to :post

after_save :update_comments_counter

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

Copy link

@cynthiainga cynthiainga left a 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 :shipit:
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.

Comment on lines +23 to +32

# 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

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 😁 😁

@GeekyHacks GeekyHacks merged commit 25c6d77 into dev Nov 18, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants