sf-wdi-31 / rspec-racer

[rspec, ruby, tdd, oop]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

# RSpec Racer

Part 1

A major racing organization has created a racing game app. They've hired you to retroactively test some code they wrote. (They want to increase their test coverage in perparation for a major refactor.)

They request that you finish writing the tests in spec/ according to what the lib/ code already has implimented and what the existing it blocks are specifying.

Note: race.rb and car.rb have already been implimented, which is not best practice. Ideally, you should always write the tests before you write the code. However, at least we're adding tests now to preserve the code's behavior after the refactor.

As a first step, you'll have to make sure the files are linked up correctly.

Remember to test normal cases, edge cases, and error cases where appropriate.

When you feel you've tested everything you should, take a look at the solutions branch and make sure you have at least covered those tests.

Part 2

The racing company is so excited by your tests, they give you free reign to design more of the racing game.

Come up with a method you think would be useful for either the Race or the Car class. Write tests for your method.

When you have test code you're happy with, add and push JUST YOUR TESTS to your GitHub fork, and make a pull request back to the class repository so that others can see your suggested tests. Make sure you give your pull request a descriptive title and a comment that explains the change you're suggesting.

Then, take a look at the test pull requests that others have made. Choose one test to implement - you can copy and paste your fellow developer's test code into your tests to easily incorporate it. (In industry, you'd use GitHub to collaborate instead of copying and pasting. However, we want to keep the class version of the repository as is.)

Happy Testing!

About

[rspec, ruby, tdd, oop]


Languages

Language:Ruby 100.0%