From the course: Ruby: Testing with RSpec

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

What is TDD?

What is TDD? - Ruby Tutorial

From the course: Ruby: Testing with RSpec

Start my 1-month free trial

What is TDD?

- You may have come across the term TDD before, and wondered what it means. It's an important idea to understand when using RSpec. In this chapter we'll learn what it is and how to use it. Before we can learn about TDD, we should give a name to the kind of testing that we've been working with so far. It's called verification and validation testing, or V&V for short. It can also be called quality assurance or QA testing. Verification and validation testing works like this. You first write the code for the feature that you want. And then you write the tests that will verify and validate that the code works correctly, or that will assure the quality of the code. TDD is short for test-driven development. In simplest terms, test-driven means test first. The idea is that you write a very small test for a small part of a feature, and then you write the code that makes that test pass. Then you write another small test. So the verification development cycle has four main steps. First, we write…

Contents