~/lightning

Lightning Talk DRYing up RSpec

Lightningat Rocky Mountain Ruby 2013 · 2013-09-25..09-27· [testing]
name:Dan Sharp
links:none on file
slides:none on file

Three-minute lightning rundown of concrete RSpec DRY tactics: use shared_examples and shared_contexts, helper modules, looping constructs and custom matchers, and pass variables into shared examples so one template covers variants. Practical rules: wait for actual duplication, run tests green before refactor, stop when readability suffers. Notes that shared groups come in four variants and naming matters, and that using describe_class enables small Ruby metaprogramming shortcuts to apply examples across controllers.

AI-written summary · about

  1. 0:00Start
  2. 0:27Why DRY tests?
  3. 0:51DRYing Rules of Thumb
  4. 1:14Shared Examples are...
  5. 1:32A Shared Example Example
  6. 1:53Quick Tips
~/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.