Coder Social home page Coder Social logo

rspec-racer's Introduction

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!

rspec-racer's People

Contributors

bgveenstra avatar ilias-t avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.