The purpose of this project was to demonstrate our learned skills on writing test cases for our Ruby programming. Here we created test cases for our existig Tic-Tac-Toe game for the player and game class. All the possible scenarios were tested which all passed the test.
In this project we created the spec directory which houses the player_spec.rb and game_spec.rb class in their respective file that is being tested
- Ruby
- RSPEC
- VSCode
- Rubocop
In order to test the game locally follow the next steps
To get this project up and running, you must have Ruby installed on your machine.
-
Clone the repo into your machine $ https://github.com/GzimAsani/tic_tac_toe_test.git
-
Cd into Tic-Tac-Toe-Game directory
-
run rspec --init
-
Cd into the spec directory, create the game_spec.rb and player_spec.rb file.
-
Require the needed files, write your test, run rspec to check if the test passes.
-
Run rubocop on your working folder and fix errors.
-
stage, commit, push to the created remote branch(tic_tac_toe_test) on github and create a pull request..
The code is divided in two main folders ./lib and ./spec. The main executable code game_spec.rb and player_spec.rb are in ./spec. The other folder contains other important classes which were incorporated in the game_spec.rb and player_spec.rb
👤 Eric Enaburekhan
- Github: @enaburekhan
- Twitter: @enaburekhaneric
- Linkedin: @ericenaburekhan
👤 Iyadi Oluwaseun
- Github: @CornerstoneII
- Linkedin: CornerstoneII
Our favourite contributions are those that help us improve the project, whether with a contribution, an issue, or a feature request!
Feel free to check the issues page to either create an issue or help us out by fixing an existing one.