6. Testing

Testing is an important part of software development, especially with dynamic languages like Ruby. Ensuring that your code works as specified is one of the most critical parts of building a successful product. Projects that skip testing often collapse under the uncertainty that small changes might introduce unwanted and unanticipated side effects.

Ruby comes with a testing framework in its standard library, and there are many testing libraries available as RubyGems. This chapter will show you how to use these tools to write effective tests. While testing doesn’t offer proof that your code is free of bugs, it does increase your confidence that you’ve found many of them before your customers do.

Item 36: Familiarize Yourself with MiniTest ...

Get Effective Ruby: 48 Specific Ways to Write Better Ruby 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.