Hi , Am new to Rspec.Can anybody tell the difference between mock and stub. In which scenarios we use these
Stubs provide canned answers to calls made during the test, usually not responding at all to anything outside what's programmed in for the test. Stubs may also record information about calls, such as an email gateway stub that remembers the messages it 'sent', or maybe only how many messages it 'sent'.
Mocks are objects pre-programmed with expectations which form a specification of the calls they are expected to receive.
just go through following link.
I hope this will help you.
Cheerrsss!! -Ganesh K