Skip to content

cmolinan/Ruby-TDD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TDD Project

DESCRIPTION

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

PROJECT DETAILS

  • Creation of a class called Solver.

  • Creation of 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.

  • Creation of a method called reverse that takes one argument, a string word, and returns word reversed (e.g. if word is "hello" it returns "olleh").

  • Creation of 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").

Getting Started

To get a local copy up and running follow these simple steps. git clone https://github.com/cmolinan/Ruby-TDD in your terminal

Author

👤 Name Github Twitter LinkedIn
Carlos Molina @cmolinan Carlos Molina
Habeeb Efiamotu Musa Owolewa @efiamotu-1 @EFYAMOTU Habeeb Musa

�� Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page. Feel free to check the issues page. ​

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

This webApp responds to a request from Microverse, which is based on the original idea of Nelson Sakwa, according to the Creative Commons License

�� License

This project is MIT licensed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages