- 📖 About the Project
- 💻 Getting Started
- 👥 Authors
- 🔭 Future Features
- 🤝 Contributing
- ⭐️ Show your support
- 🙏 Acknowledgements
- ❓ FAQ (OPTIONAL)
- 📝 License
In this project, I'm putting in practice a test design project in Ruby.
The below requirements are implemented:-
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").
I used the following technologies in this design.
The program entails the following.
- Test factorails
- Test reverse string
- Test fizzbuzz
Follow the following simple steps to run the project.
In order to run this project you need:
Clone this repository to your desired folder:
Install this project with:
cd TDD-project
gem install
To run the project, execute the following command:
Example command:
ruby {file_name.rb}
To run tests, run the following command:
rspec spec/
👤 Harshika
- Github: @harshi0102
- Twitter: @harshika0102me
- Linkedin: @harshikagovind
👤 IRADUKUNDA Pacific Rugwizangoga
- GitHub: @githubhandle
- LinkedIn: LinkedIn
👤Daniel Kigozi
- GitHub: Daniel-Kigozi
- Twitter: @DanielKigozi15
- LinkedIn: daniel-kigozi-375182208/
- Add more function methods
- Provide live demo video
- Variety of arguments in methods
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
This project is MIT licensed.