Test-Doubles and Stubbing in Ruby On Rails Tests

Test Double is a generic term for any case where you replace a production object for testing purposes. — Martin Fowler

Stubbing out methods on the object being tested is a symptom of bad internal APIs or poor coupling.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Rafael A. George Duval

Learning about software engineering through the lens of everything, one snippet of text at a time. Chief Editor: https://snippetsoftext.substack.com