~/workshop

Workshop / Taming Chaotic Specs: RSpec Design Patterns

Workshopat Rails Pacific 2016 · 2016-05-20..05-21· [testing, ruby-on-rails]
github:acuppy
slides:none on file

Claim: large, messy specs get tamed by concrete refactor patterns and small tooling choices. Workshop refactors a real 9,000+ line spec down using Minimum Valid Object, permutation tables and golden‑master snapshots, shows how RSpec predicate matchers, Factory Girl factories and the approvals gem produce fewer false positives and clearer failures, and demonstrates snapshot verification files and shared examples that replace repetitive cases. Examples run and verify that the refactored specs are readable, DRY and actually catch the intended validation errors.

AI-written summary · about

  1. 0:00Start
  2. 2:49PROBLEM
  3. 5:30TAMING CHAOTIC SPECS RSpec Design Patterns
  4. 7:04Minimum Valid Object
  5. 7:502. Make one specific change
  6. 15:24RSpec Predicate Magic Methods
  7. 20:36Permutation Tables
  8. 27:03Golden Master
  9. 27:28visual confirmation
  10. 32:22Best Practices
  11. 34:51DESCRIPTIVE NAMING
  12. 36:28Extract Common Expectations
  13. 36:54Custom Matchers
  14. 37:54Factories over Fixtures
~/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.