~/talk

Avoiding Sneaky Testing Antipatterns

Talkat Helvetic Ruby 2024 · on Friday, 2024-05-17· [testing]
links:none on file
slides:none on file

Practical rules for tightening Rails test suites: prefer positive assertions like expect(user.save).to be true instead of negations, force a failing test by stashing a bug fix before writing the test, avoid broad RSpec let usage and keep setup inline to preserve cause and effect, and never add production code paths gated by test mode — use gem helpers such as Clearance’s test helpers and FactoryBot for fixtures. Goal: expressive, isolated, reliable tests that actually catch regressions.

AI-written summary · about

~/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.