Write expressive tests by mastering RSpec matchers

RSpec is the Cadillac Escalade of testing frameworks. It does its best to give you a comfortable, feature-rich, even luxurious testing environment. Some programmers love it for this reason; others not so much. But love it or hate it, if you work on projects that are tested using RSpec, it pays to deeply understand the tools it provides.

One person who understands RSpec better than just about anyone else I know is Noel Rappin. He is the author of Rails Test Prescriptions, and in his workshops he has taught better testing practices to hundreds of students.

A few years ago Noel appeared as a guest chef on RubyTapas, with a couple of episodes that dive deep into the RSpec 3 matcher syntax. Now, for the first time, I'm making those two episodes available for free. In the first, you'll learn to understand the Ruby object model behind the RSpec matching syntax. And in the 2nd, you'll learn how to apply RSpec's compound matcher features to efficiently and expressively validate the structure of complex data.

Enjoy!

 

 

Understanding and fully exploiting your testing tools is an important part of being effective at testing code. But in order to master software testing, you need more than just tool competence. You need to have the right mindset.

What tests should you write first? How do you get big scary hunks of legacy code under test? What kinds of tests are most important to write? How do you cope with slow, unreliable test suites?

If you find yourself asking any of these questions, you're not alone. Recently I teamed up with Noel again to create Noel Rappin's Testing Journal. It's a completely FREE email course that distills some of the testing strategies that Noel has evolved and taught over the years. If you're ready to move beyond mechanics and start mastering the mindset of automated testing, subscribe to Noel Rappin's Testing Journal right now.