RSpec: The Bad Parts

RSpec is good, but it’s even better with less of it. We’ll first look through a heavily obfuscated real-world example, learning why parts of RSpec like let, subject, before, shared_examples, and behaves like can make your tests hard to read, difficult to navigate, and more complex. We’ll discuss when DRY is not worth the price. Then we’ll refactor some real open source RSpec code from Mastodon. In the end, we’ll look at what’s left. RSpec: The Good Parts.