Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antonio-gg-dev/fizzbuzz-bashunit
https://github.com/antonio-gg-dev/fizzbuzz-bashunit
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/antonio-gg-dev/fizzbuzz-bashunit
- Owner: antonio-gg-dev
- License: gpl-3.0
- Created: 2023-10-21T09:23:59.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-11-26T16:58:58.000Z (12 months ago)
- Last Synced: 2024-05-02T05:53:23.661Z (7 months ago)
- Language: Shell
- Size: 28.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FizzBuzz Kata with bashunit
This kata is designed to be one of the first katas for learning TDD.
Additionally, in this project, I will use it to demonstrate how to work with bashunit.We will emphasize the following:
- We will start by writing a failing test for the simplest behavior.
- We will implement the simplest amount of code necessary to make the test pass.
- As we add more tests, we will refactor to make the code more generic and appropriate.## Instructions
Write a script that takes a positive number as an argument and prints the result to the screen.
Our script must also comply with the following rules:
- If the number is a multiple of three, the result will be "Fizz".
- If the number is a multiple of five, the result will be "Buzz".
- If the number is a multiple of both three and five simultaneously, the result will be "FizzBuzz".For example, if we request the numbers from 1 to 15 in order, the script should return:
```
1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
```