Testing with RSpec
The minitest framework has a lot going for it. It’s simple and compatible in style with frameworks from other languages (such as JUnit for Java and pytest for Python).
RSpec has different things going for it. It’s feature-rich (or “complicated,” as some would say), and it has a different vocabulary for discussing testing. It also has a different syntax. Even so, that syntax has influenced the design of other testing tools including the Jasmine and Jest JavaScript testing frameworks.
In RSpec, the focus isn’t on assertions. Instead, you write expectations. RSpec is very much concerned with driving the design side of things. As a result, the vocabulary words of RSpec (expectation and specification) are associated with ways ...
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