/TDD_Project

In this project we will implement a class with some methods, but will do it by doing test-driven development (TDD). The idea is to write tests first and then the code.

Primary LanguageRubyMIT LicenseMIT

TDD Project

📗 Table of Contents

📖TDD Project

In this project, the goal is to implement a class called Solver with three methods (factorial, reverse, and fizzbuzz) using the test-driven development (TDD) approach. TDD involves writing tests before writing the actual code. For the factorial method, it calculates the factorial of a given number, ensuring that it handles special cases like 0 and negative numbers. The reverse method reverses a given word, and the fizzbuzz method constructs a string based on a given number, following specific rules. The TDD approach ensures that tests are written to define the expected behavior of each method, and the code is then implemented to pass those tests. This iterative process of writing tests first helps guide the development, improves code quality, and ensures that any changes to the code are validated by the tests that are created.

🛠 Built With

Tech Stack

The project is built with the following technologies:

  • Ruby

(back to top)

Key Features

The key features of this project include:

  • Reliability and Maintainability
  • Clear Specification
  • Incremental Development
  • Improved Code Organization
  • Early Bug Detection
  • Better Test Coverage
  • Documentation and Collaboration
  • Refactoring Support

(back to top)

💻 Getting Started

To get started with the project, follow the instructions below.

Setup

To set up the project locally, you need to have Ruby installed on your system.

Prerequisites

  • Ruby (version 2.5 or above)

Install

  1. Clone the repository:
  clone git@github.com:emhamza/test-driven-development.git
  1. Change into the project directory:
cd opp-school-library
bundle install

Usage

Modify and run the ruby files to utilize the MyList class and test the methods.

ruby person.rb
ruby student.rb
ruby teacher.rb

Run the execution file

./main.rb
  1. The output will be printed on the console.

Run tests

To run the test change the file name for respective file

 ruby -S rspec spec/<filename>_spec.rb

Deployment

There is no specific deployment process for this project as it is a code implementation. However, you can integrate project into your own Ruby applications.

(back to top)

👥 Author

👥 Authors

👤 Nabeel Ahmed

👤 Daniel Carrera

🔭 Future Features

Possible future features for this project include:

  • Add more methods to the TDD Project
  • Enhance error handling and edge case scenarios

(back to top)

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

If you would like to contribute to this project, you can follow these steps:

  1. Fork the repository.
  2. Create a new branch for your changes.
  3. Make your changes and commit them.
  4. Push your changes to your forked repository.
  5. Create a pull request back to the original repository.

(back to top)

⭐️ Show your support

If you like this project, please give it a star on GitHub.

(back to top)

🙏 Acknowledgments

(back to top)

❓ FAQ (OPTIONAL)

  • Can I modify and redistribute this project?

    • Yes, you can modify and redistribute this project as long as you follow the terms of the MIT license.
  • How can I contribute to this project?

    • Contributions, issues, and feature requests are welcome! You can check the issues page to see if there are any current issues or feature requests that you can work on. If not, feel free to submit a new issue or pull request. Before contributing, please read the CONTRIBUTING.md file for guidelines on how to contribute to this project.

(back to top)

📝 License

This project is MIT licensed.

(back to top)