An open API service indexing awesome lists of open source software.

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.

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]
![Ruby](https://img.shields.io/badge/ruby-A30031.svg?style=for-the-badge&logo=ruby&logoColor=white) ![Rubocop](https://img.shields.io/badge/RUBOCOP-A30031.svg?style=for-the-badge)
## Authors

👤 **Kwaleyela Musilizo Ikafa**

[![GitHub](https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white)](https://github.com/Kwaleyela-Ikafa)
[![LinkedIn](https://img.shields.io/badge/linkedin-%230077B5.svg?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/kwaleyela-musilizo-ikafa/)
[![Twitter](https://img.shields.io/badge/Twitter-%231DA1F2.svg?style=for-the-badge&logo=Twitter&logoColor=white)](https://twitter.com/K_Ikafa)

👤 **Praises Tula**

[![GitHub](https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white)](https://github.com/PraisesPJMT/)
[![LinkedIn](https://img.shields.io/badge/linkedin-%230077B5.svg?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/praises-tula/)
[![Twitter](https://img.shields.io/badge/Twitter-%231DA1F2.svg?style=for-the-badge&logo=Twitter&logoColor=white)](https://twitter.com/PraisesPJMT/)

[![Gmail](https://img.shields.io/badge/Gmail-D14836?style=for-the-badge&logo=gmail&logoColor=white)](mailto:praisesmusa@gmail.com)
[![AngelList](https://img.shields.io/badge/AngelList-%23D4D4D4.svg?style=for-the-badge&logo=AngelList&logoColor=black)](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.