https://github.com/praisespjmt/test-driven-development-practice
This repository has an implementation a `Solver` class with some methods using test-driven development (TDD). The idea is to write tests first and then the code. The project was done entirely with Ruby.
https://github.com/praisespjmt/test-driven-development-practice
ruby
Last synced: over 1 year ago
JSON representation
This repository has an implementation a `Solver` class with some methods using test-driven development (TDD). The idea is to write tests first and then the code. The project was done entirely with Ruby.
- Host: GitHub
- URL: https://github.com/praisespjmt/test-driven-development-practice
- Owner: PraisesPJMT
- Created: 2022-11-10T09:43:19.000Z (over 3 years ago)
- Default Branch: development
- Last Pushed: 2022-11-11T14:26:33.000Z (over 3 years ago)
- Last Synced: 2025-02-04T12:56:28.389Z (over 1 year ago)
- Topics: ruby
- Language: Ruby
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Test-Driven-Design-Practice
>In this project we implemented a class with some methods using test-driven development (TDD).
> The idea is to write tests first and then the code.
> We created a class called `Solver` with the following methods:
> - `factorial` that takes one argument, an integer `num`, and returns the factorial for that number. The factorial is the multiplication of all integers from 1 to `num` and has the special case that the factorial of 0 is 1. This method only accepts 0 and positive integers, so if a negative integer is given it should raise an exception.
> - `reverse` that takes one argument, a string word, and returns word reversed (e.g. if word is `hello` it returns `olleh`).
> - `fizzbuzz` that takes one argument, an integer `num`, and returns a string. The returned string is constructed following these rules:
> - When `num` is divisible by `3`, return `fizz`.
> - When `num` is divisible by `5`, return `buzz`.
> - When `num` is divisible by `3` and `5`, return `fizzbuzz`.
> - Any other case, return `num` as a string (e.g. say `num` is `7` then return `7`).
## Built With [Linter]
 
## Authors
👤 **Kwaleyela Musilizo Ikafa**
[](https://github.com/Kwaleyela-Ikafa)
[](https://www.linkedin.com/in/kwaleyela-musilizo-ikafa/)
[](https://twitter.com/K_Ikafa)
👤 **Praises Tula**
[](https://github.com/PraisesPJMT/)
[](https://www.linkedin.com/in/praises-tula/)
[](https://twitter.com/PraisesPJMT/)
[](mailto:praisesmusa@gmail.com)
[](https://angel.co/u/praises-tula/)
## 🤝 Contributing
Contributions, [issues](../../issues), and feature requests are welcome!
## 🤝 Contributing
Contributions, issues, and feature requests are welcome!
Feel free to check the [issues page](../../issues/).
## Show your support
Give a ⭐️ if you like this project!
## Acknowledgments
- Hat tip to you for checking out this amazing project.