What’s Next
In this chapter, we covered Ruby’s two most commonly used test frameworks: minitest and RSpec. Which should you use? Well, if you’re working on a project that already uses one of them, we recommend sticking with that one. There’s not so much difference between the two that it’s worth re-writing all your tests.
If you’re starting a new project, consider whether you like RSpec’s syntax. RSpec is probably more widely used, but some prominent Ruby projects still use minitest, including Ruby on Rails. RSpec has a higher initial complexity but is also more flexible and has more available functionality out of the box. Ultimately, though, it’s a question of which syntax you like better and will get you to write more tests.
We’ve finished ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access