Chapter 17. Unit Testing

In This Chapter

The Tested Code

Test::Unit

RSpec

Cucumber

Software quality is an important subject. Improving software quality is a big task, which includes code reviews, team meetings, code quality tools, QA, and more. The one task that you, as a developer, can do to make sure your code works as expected even before it leaves your development machine is to test it. By that, I don’t mean to run it once, see that it works, and move on. I mean to write unit tests for it.

A unit test is a piece of code that runs the software and tests its output. Usually a unit test tests the smallest portion of code it can. For example, every method will be tested to make sure it works as expected. By having code ...

Get IronRuby Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.