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

feature/Create unit tests #7

Merged
merged 30 commits into from
Sep 7, 2023
Merged

feature/Create unit tests #7

merged 30 commits into from
Sep 7, 2023

Conversation

ahmedeid6842
Copy link
Collaborator

🚩Milestone 7: create unit tests | unit_test - >>branch<< -

Hi there! @NitBravoA92 and @ahmedeid6842 here. 👋

This is the PR for the create unit tests activity. The main objective of this Milestone is to learn how to how to write unite testing function by the help of rspec

Here is a summary of what has been done:

  • create the following test cases for Book class

    • should save the id, title, author and empty rentals of the new book
    • should add a new object of the Rental class to the rentals array.
    • should convert the a Book object to a hash format by to_json method.
  • create the following test cases for CapitalizeDecorator class

    • should create a new CapitalizeDecorator object.
    • should return the the name of the teacher in capitalize.
  • create the following test cases for Classroom class

    • should create an instance of the Classroom class.
    • should add a new object of the Student class to the students array.
  • create the following test cases for Decorator class

    • should create a new Decorator object.
    • should return the the name of the person.
  • create the following test cases for the Nameable class

    • should create a new Nameable object
    • should return a message: 'NotImplementedError: correct_name is not implemented' when the name is not set
  • create the following test cases for the Person class

    • should be able to be created.
    • should save the id, name, age of the new person.
    • should validate if the person can use the services.
    • should return the name of the Person
    • should add a new object of the Rental class to the rentals array
  • create the following test cases for the Rental class

    • should create a new rental object.
    • should save the id, date, book, teacher of the new rental.
  • create the following test cases for the Student class

    • should be able to be created
    • should save the id, classroom, age, name of the new student.
    • should return the ¯(ツ)/¯ string.
    • should convert the a Student object to a hash format.
  • create the following test cases for the Teacher class

    • should be able to be created.
    • should save the id, specialization, age, name of the new teacher.
    • should always return true.
    • should convert the a Teacher object to a hash format

⭐To the code reviewer 👨‍💻

💝 We really thank 🙇‍♂️ you, dear code reviewer 👨‍🎨 for dedicating your precious 🥇 time ⌚ to check the PR 🧾 .

We kindly ask 🙏 dear code reviewer 🤵 that if there is any kind of issue 🦯 in this project, please do list 📃 them in a descriptive 💡 manner and give your best suggestions 🎁 if needed.

If you think some big issues are essential to be changed ♻️ please kindly contact 📞 us through Zoom or Slack, We're available on Microverse UTC-6 time zone.

giphy

ahmedeid6842 and others added 30 commits September 7, 2023 00:42
@ahmedeid6842 ahmedeid6842 added the enhancement New feature or request label Sep 7, 2023
Copy link

@MahmoudBakr23 MahmoudBakr23 left a comment

Choose a reason for hiding this comment

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

Hi Team 😃,

Your project is complete! There is nothing else to say other than... It's time to merge it :shipit:
Congratulations! 🎉

Highlights

Cheers, and Happy coding!👏👏👏

  • Great job installing the required gem for testing
  • Great file structure
  • Well done testing each of the classes
  • Nice work using describe and context keywords properly
  • All the tests are passing ✔️
  • Excellent communication with the reviewer. Thank you ❤️
  • Descriptive PR and README
  • Correct Linters

Feel free to mention @MahmoudBakr23 to leave any questions or comments in the PR thread if something is not 100% clear.


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.

@ahmedeid6842 ahmedeid6842 merged commit 724d9ff into dev Sep 7, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants