I’ve only just gotten to the section Introducing IO under Making Your Tests Fast. The discussion jumps into using RSpec mocks without any explanation as far as I can see. I am a beginner with RSpec and am trying to make my way through The RSpec book, and the various ins and outs of mocks and related topics are still fuzzy to me. I think that the book needs a quick intro to the meaning and syntax of mocks, maybe in an appendix if you think it’s too basic for most of the readers.
An example of what is confusing to me is the line
I think I understand @should_receive@ as setting up a message expectation, but here is it replacing the actual Twitter::Search with a mock?