TDD Workshop: Mocking, Stubbing, and Faking External Services
summary
Workshop walks through writing failing specs and making them pass using shoulda matchers and RSpec, asserting model constraints like validates :name, presence: true, uniqueness: true. It shows unit tests for presence and uniqueness, how failures look, adding database-level constraints, and writing a custom validator with its own spec. Seven modules are planned and one module is completed; examples run and tests pass during the demo.
AI-written summary · about
chapters (7)
- 0:00TDD workshop intro
- 1:00Testing validations with Shoulda
- 3:55Adding validations to pass
- 5:20Database vs model validations
- 8:23Custom validations and tests
- 12:23Preventing validation removal
- 13:50Workshop resources
related talks
47mYay! Mocks!
27mTDD on the Shoulders of Giants
29m"Testing. Why so serious?"
20mTDD with WebMock
01h 04mClean RSpec: A Workshop on Ruby Testing Craftsmanship
42mWorkshop / Taming Chaotic Specs: RSpec Design Patterns
01h 13mWorkshop (Part 1): Stop Writing Tests, Start Writing Specifications!
27mUnderstanding Rails test types in RSpec
