Learn to use stubs, mocks, spies, and fakes with RSpec.
Use rspec-mocks to stub out an object in a test.
Learn to set constraints on stubbed methods using RSpec.
Learn to unit test methods with side effects and mutation using mocks.
Learn how to keep your unit tests tidy with an alternative to mocks: spies.
Learn how to test complex or flexible interactions by using fakes.
Now that you've learned how to use stubs, mocks, spies, and fakes, it's time to pull it all together.