Month: September 2019

RSpec Ruby Testing: Normal Doubles

Decoupling unit tests in larger apps can get pretty hairy, especially for newer developers whose classes probably call each other 19 times a millisecond. Not calling anyone out; we all know the struggle. In TDD mocks are a strategy to create doubles of actual objects in the program to...
Read More

RSpec Ruby Testing: Shared Examples and Shared Context

Basic Rspec testing is extremely intuitive, but it’s very easy for code to get repetitive and start violating the DRY principle. Very often we can find ourselves copy and pasting example after example and subject after subject. Luckily, RSpec gives us the ability to DRY up our code by...
Read More