Description
Adds mocking and stubbing tools for Ruby tests so code can replace collaborators with controlled behavior. It is useful for isolating units, simulating errors, and checking interactions.
Mocks can make tests pass while real integrations are broken. Use them for focused tests, but keep contract or integration tests for important boundaries.