I do not know much about RSpec, but usually you use mocks for everything that you do not want to test.
Mocks is what you use to replace anything other than the class you are testing so that you have this class in complete isolation. Only then is it a real unit test, otherwise you would test the tested class and all dependent / called classes, which would then be an integration test (which is useful in certain scenarios, but it probably wouldn’t do anything you want to have in TDD / BDD ...) .
Thomas
source
share