~/talk

Fake It While You Make It

Talkat RailsConf 2020 CE · 2020-05-04..05-05· [testing, ruby-on-rails]
slides:none on file

Builds SWEATHR on a real weather API then walks four concrete approaches: live requests (slow, flaky), Webmock stubs (fast but brittle), a Sinatra fake web app with Capybara Discoball (full‑stack but extra maintenance), and VCR cassettes (record once, replay until stale). Recommends layering: an API client, a CurrentConditions mapper, and a weather module with a test‑mode fake client. Demonstrates each tool, shows tradeoffs, and notes tests often cost more time than the implementation.

AI-written summary · about

  1. 0:00Introduction
  2. 3:45Sweater Weather
  3. 5:45Dependency
  4. 7:15Model Tests
  5. 8:25Web Mock
  6. 10:35Stubbing
  7. 14:40Using Fakes
  8. 16:05Using Fixtures
  9. 21:30Review
  10. 24:50Current Conditions
  11. 26:40Weather Module
  12. 27:20Example
  13. 29:10Test Mode
  14. 30:40Test Mode Benefits
  15. 33:10Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.