Outside-In Testing
summary
Argues that writing acceptance tests from the outside in yields the minimum code to ship features, resilient refactors, and high coverage; demos a user registration implemented with Capybara + capybara email gem and MiniTest, where a nine-line acceptance test drives ~21 lines of implementation and yields 100% coverage on four lines; shows that acceptance tests survive a Rails-to-Backbone rewrite, recommends form builders/fixtures to fill edge-case cracks, and warns against heavy unit tests that lock in implementation.
AI-written summary · about
chapters (8)
- 0:00Start
- 2:25I write tests from a user's perspective
- 6:58Replace "Unit" with your entire application
- 27:14User Registration
- 28:03Abstract Error Handling Model, Controller, Form Object, Form Builder
- 29:53Unit Test the lower branches
- 30:12Trading Flexibility For efficiency
- 34:52Questions?
related talks
49mFront End Testing Frontier
01h 19mBDD and Acceptance Testing with RSpec & Capybara
54mTDD Workshop: Outward-in Development, Unit Tests, and Fixture Data
32mMiniTest: Write Awesome Tests
37mClean Test Code
50mWriting Solid Ruby Code
29mMinitest with Capybara: Tips, Tricks and Lessons Learned
01h 00mTesting Heresies
