Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Yay! Mocks!
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Corey Haines
June 26, 2012
Programming
310
4
Share
Yay! Mocks!
Discussion about usage of test-doubles in driving design
Corey Haines
June 26, 2012
More Decks by Corey Haines
See All by Corey Haines
Getting the most out of a conference
coreyhaines
3
260
Other Decks in Programming
See All in Programming
Codex CLI でつくる、Issue から merge までの開発フロー
amata1219
0
340
ネイティブアプリとWebフロントエンドのAPI通信ラッパーにおける共通化の勘所
suguruooki
0
260
Vibe하게 만드는 Flutter GenUI App With ADK , 박제창, BWAI Incheon 2026
itsmedreamwalker
0
550
의존성 주입과 모듈화
fornewid
0
130
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
580
ふりがな Deep Dive try! Swift Tokyo 2026
watura
0
190
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
4
850
How Swift's Type System Guides AI Agents
koher
0
210
仕様漏れ実装漏れをなくすトレーサビリティAI基盤のご紹介
orgachem
PRO
9
5.5k
へんな働き方
yusukebe
6
2.9k
ルールルルルルRubyの中身の予備知識 ── RubyKaigiの前に予習しなイカ?
ydah
0
130
おれのAgentic Coding 2026/03
tsukasagr
1
140
Featured
See All Featured
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
500
Designing for humans not robots
tammielis
254
26k
Accessibility Awareness
sabderemane
0
97
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
200
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
180
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.2k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
330
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.4k
GraphQLとの向き合い方2022年版
quramy
50
15k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
120
Transcript
Tuesday, June 26, 2012
YAY! Mocks! @coreyhaines Nordicy RubyConf 2012 Tuesday, June 26, 2012
YAY! Test Doubles! @coreyhaines Nordicy RubyConf 2012 Tuesday, June 26,
2012
Zak! Tuesday, June 26, 2012
Test-Driven Development Tuesday, June 26, 2012
Object-Oriented is about messages Tuesday, June 26, 2012
Object-Oriented is about interactions Tuesday, June 26, 2012
Object-Oriented is about services Tuesday, June 26, 2012
Roles vs Things Tuesday, June 26, 2012
Test-Driven Development Tuesday, June 26, 2012
Test-First Development Tuesday, June 26, 2012
Test-Driven vs Test-First Tuesday, June 26, 2012
Reaction to pain Tuesday, June 26, 2012
Test-First -> Change Tests Tuesday, June 26, 2012
Test-Driven -> Change Design Tuesday, June 26, 2012
Test-Doubles Often Highlight Pain Tuesday, June 26, 2012
Zak! Tuesday, June 26, 2012
Examples Tuesday, June 26, 2012
Showing list of Coderetreats for today Tuesday, June 26, 2012
You have to change your test When you change this
hash Tuesday, June 26, 2012
Feels Very Fragile Tuesday, June 26, 2012
PAIN! Tuesday, June 26, 2012
Discomfort! Tuesday, June 26, 2012
Tuesday, June 26, 2012
Why is this information relevant to the controller? Tuesday, June
26, 2012
Bypassing Layers Tuesday, June 26, 2012
This is odd Tuesday, June 26, 2012
Controller calling database? Tuesday, June 26, 2012
Controller should know ‘WHAT’ not ‘HOW’ Tuesday, June 26, 2012
Better to insert a layer Tuesday, June 26, 2012
Controller Business-Oriented Services DB Tuesday, June 26, 2012
What, not How Tuesday, June 26, 2012
Better to delegate the How Tuesday, June 26, 2012
TDD is about design Tuesday, June 26, 2012
Change design, not tests Tuesday, June 26, 2012
Focusing on usage Tuesday, June 26, 2012
I like Presenters! Tuesday, June 26, 2012
Tuesday, June 26, 2012
double depending on doubles?? Tuesday, June 26, 2012
UGH! Tuesday, June 26, 2012
Too much detail at this level? Jumping levels of abstraction?
Tuesday, June 26, 2012
Change design to fix pain Tuesday, June 26, 2012
Simplify our example Tuesday, June 26, 2012
Simplify our example Tuesday, June 26, 2012
Much simpler, more focused on what the controller needs to
know Tuesday, June 26, 2012
Tuesday, June 26, 2012
TDD is about refactoring Tuesday, June 26, 2012
TDD is about refactoring away from discomfort Tuesday, June 26,
2012
Changing your design, to fix pain Tuesday, June 26, 2012
Test doubles can help highlight and fix pain Tuesday, June
26, 2012
Take-Home Challenge Tuesday, June 26, 2012
Tuesday, June 26, 2012
Coupled Roles Tuesday, June 26, 2012
Unnecessary noise Tuesday, June 26, 2012
or false positive if yesterday’s or tomorrow’s are not created
in database Tuesday, June 26, 2012
How to change design to fix this? Tuesday, June 26,
2012
Thanks! @coreyhaines Nordicy RubyConf 2012 font inspiration: bit.ly/corey-sans Tuesday, June
26, 2012