~/talk

Interfaces Not Required

Talkat RubyHACK 2018 · 2018-05-03..05-04· [testing, ruby]
slides:none on file

Argument: formal interfaces are unnecessary in Ruby because tests provide stronger guarantees. Uses RSpec shared_examples to specify a repository contract: methods fine_by_id create update, create returns integer id or false, find_by_id returns entity or nil, update returns id or false. Adds behavioral assertions that the id from create or update roundtrips through find_by_id. Demonstration shows a portable test suite that enforces behavioral safety across implementations so Interfaces Not Required becomes actionable.

AI-written summary · about

  1. 0:00Start
  2. 0:33Cory Brown
  3. 5:14Active Record
  4. 5:28Repository Pattern
  5. 6:33The Behavior for a Repository
  6. 9:45R-Spec Shared Example
  7. 19:14Cognitive Load
~/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.