DEV Community

Discussion on: How to stop API calls in RSpec and Return your Own Data

Collapse
 
epigene profile image
Augusts Bautra

A quick note, often you'll want to return status 200 with a specific body. Since status 200 is to_returns default, you can simply write to_return(body: "something").

Collapse
 
husteadrobert profile image
Robert Hustead

Wow, thanks for the info! The less code you write, the less chance for bugs and errors!