Anton Zolotov

I'm a software developer, entrepreneur and CEO of GunpowderLabs, a web and mobile development consultancy. Contact me.

The difference between mocks and stubs

A stub replaces a method with code that returns a specified result.

let(:user) { User.create! }

A mock is a stub with an expectation that the method gets called.


blog comments powered by Disqus