Mock Method Chain Calls With RSpec
Generally with RSpec you mock one method call at a time:
Sometimes you are dealing with code that involves a chain of method calls.
If it becomes unreasonable to mock out each individual method, you can instead mock out the chain of calls.
Alternatively, you can write this as:
Last updated