O'Reilly logo

Instant RSpec Test-Driven Development How-to by Charles Feduke

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 1. Instant RSpec Test-Driven Development How-to

Welcome to Instant RSpec Test-Driven Development How-to. This short book aims to get you productive with RSpec and Test-Driven Development (TDD) as quickly as possible.

In TDD, we follow a simple but important tenet, which is red, green, refactor. Red represents writing test code that exercises code you wish you had and then seeing the test code fail when executed. (It gets the name red from a unit testing software that almost always represents failing tests with the red color.) Green is the stage in the cycle in which you actually write the code to satisfy the test in the simplest possible way. (If you guessed that the unit testing software shows passing tests in green, you're right!) Refactor ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required