Learn how to use the popular RSpec suite of libraries (core, expectations, and mocks) to test your Ruby application.
Learn how to use the popular RSpec suite of libraries (core, expectations, and mocks) to test your Ruby application.
In this course, we will be testing a simple command line card game using RSpec. We'll cover the core three libraries: the first module covers the core syntax and command line runner core, the second the expectation library for expressing rich assertions about your code, and the third covers mocks, a powerful tool for specifying collaborations between objects and getting useful design feedback. The final module places RSpec in the wider Ruby ecosystem, looking at the major RSpec versions and common patterns you'll encounter in the wild. In addition to covering the technical aspects of using RSpec, we'll also cover best practices for using them so you get the most out of your test suite: different types of tests, what kinds of things to test, when different styles are appropriate. This is applied in numerous worked examples.
OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.
Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.
Find this site helpful? Tell a friend about us.
We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.
Your purchases help us maintain our catalog and keep our servers humming without ads.
Thank you for supporting OpenCourser.