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
Corey Haines
June 26, 2012
Programming
4
300
Yay! Mocks!
Discussion about usage of test-doubles in driving design
Corey Haines
June 26, 2012
Tweet
Share
More Decks by Corey Haines
See All by Corey Haines
Getting the most out of a conference
coreyhaines
3
240
Other Decks in Programming
See All in Programming
CEDEC 2025 『ゲームにおけるリアルタイム通信への QUIC導入事例の紹介』
segadevtech
1
550
新世界の理解
koriym
0
110
PHPカンファレンス関西2025 基調講演
sugimotokei
6
1k
Gemini CLIの"強み"を知る! Gemini CLIとClaude Codeを比較してみた!
kotahisafuru
3
850
Dart 参戦!!静的型付き言語界の隠れた実力者
kno3a87
0
120
バイブスあるコーディングで ~PHP~ 便利ツールをつくるプラクティス
uzulla
1
310
AI Agent 時代のソフトウェア開発を支える AWS Cloud Development Kit (CDK)
konokenj
6
1k
JetBrainsのAI機能の紹介 #jjug
yusuke
0
160
[Codecon - 2025] Como não odiar seus testes
camilacampos
0
100
AIに安心して任せるためにTypeScriptで一意な型を作ろう
arfes0e2b3c
0
320
React は次の10年を生き残れるか:3つのトレンドから考える
oukayuka
41
16k
はじめてのWeb API体験 ー 飲食店検索アプリを作ろうー
akinko_0915
0
180
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Embracing the Ebb and Flow
colly
86
4.8k
Fireside Chat
paigeccino
37
3.6k
The Cult of Friendly URLs
andyhume
79
6.5k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
Speed Design
sergeychernyshev
32
1k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
530
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
How to train your dragon (web standard)
notwaldorf
96
6.1k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
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