https://github.com/codehass/tdd-project
https://github.com/codehass/tdd-project
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/codehass/tdd-project
- Owner: codehass
- License: mit
- Created: 2023-03-16T13:06:15.000Z (almost 3 years ago)
- Default Branch: develop
- Last Pushed: 2023-03-16T16:31:20.000Z (almost 3 years ago)
- Last Synced: 2025-01-18T23:54:34.852Z (about 1 year ago)
- Language: Ruby
- Size: 10.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 📗 Table of Contents
- [📗 Table of Contents](#-table-of-contents)
- [📖 Practice Test Driven Development(TDD) ](#-practice-test-driven-developmenttdd-)
- [🛠 Built With ](#-built-with-)
- [🛠 Tech Stack ](#-tech-stack-)
- [Key Features ](#key-features-)
- [💻 Getting Started ](#-getting-started-)
- [Prerequisites](#prerequisites)
- [Setup](#setup)
- [Install](#install)
- [Usage](#usage)
- [👥 Authors](#-authors)
- [🔭 Future Features ](#-future-features-)
- [🤝 Contributing ](#-contributing-)
- [⭐️ Show your support ](#️-show-your-support-)
- [🙏 Acknowledgments ](#-acknowledgments-)
- [❓ FAQ ](#-faq-)
- [📝 License ](#-license-)
# 📖 Practice Test Driven Development(TDD)
> In this project you will implement a class with some methods, but you will do it by doing test-driven development (TDD). Remember that the idea is to write tests first and then the code.
> #Project requirements
>
> - Create a class called Solver.
> Create a method called factorial that takes one argument, an integer N, and returns the factorial for that number. The factorial is the multiplication of all integers from 1 to N 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.
> Create a method called reverse that takes one argument, a string word, and returns word reversed (e.g. if word is "hello" it returns "olleh").
> - Create a method called fizzbuzz that takes one argument, an integer N, and returns a string. The returned string is constructed following these rules:
> When N is divisible by 3, return "fizz".
> When N is divisible by 5, return "buzz".
> When N is divisible by 3 and 5, return "fizzbuzz".
> Any other case, return N as a string (e.g. say N is 7 then return "7").
> Remember to start with tests for all of the methods described above. Your commit history should prove that you have used TDD.
Client
> - serves as good practice for TDD.
> - Reverse a string app.
> - FizzBuzz app
To get a local copy up and running, follow these steps.
### Prerequisites
In order to run this project you need:
- Mac or PC
- Install Ruby
- Understanding of Ruby
- **IRB**
- **Gems to test linters**
- **RSpec to run tests**
### Setup
Clone this repository to your desired folder:
```sh
cd into your-folder
git clone https://github.com/admirerbrown/TDD-project.git
```
### Install
Install this project with:
- GitHub Actions
- Linters
- Rubocop
- Ruby
- Rspec
### Usage
- Use this project as a step to learning to practice building backend applications with Ruby and OOP concepts.
> - run "Rspec your-file-name"
👤 **Samuel Kyere**
- GitHub: [@admirerbrown](https://github.com/admirerbrown)
- Twitter: [@admirerbrown](https://twitter.com/brown_admirer)
- LinkedIn: [@samuelkyere](https://www.linkedin.com/in/samuel-ntow-kyere/)
👤 **Hassan EL OUARDY**
- GitHub: [@codehass](https://github.com/codehass)
- Twitter: [@hassanelourdy](https://twitter.com/hassanelourdy)
- LinkedIn: [Hassan El OUARDY](https://www.linkedin.com/in/hassan-el-ouardy-360b99169/)
- [ ] **Add more practice classes **
- [ ] Add more complex requirements
- [ ] Add console interface
Contributions, issues, and feature requests are welcome!
Feel free to check the [issues page](https://github.com/admirerbrown/TDD-project/issues).
If you like this project, please leave a ⭐️
I would like to thank Microverse for providing us with reading materials that aided us to during the project development
- **Can I use this code?**
- yes, it is open source. Feel free to fork it.
- **Can I contribute to this project?**
- Contact me so I can add you as a collaborator. Alternatively you can leave an issue, it will be well appreciated.
This project is [MIT](./LICENSE) licensed.