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
List Unfolding - 'unfold' as the Computational Dual of 'fold', and how 'unfold' relates to 'iterate'"
philipschwarz
PRO
0
190
Go1.25からのGOMAXPROCS
kuro_kurorrr
0
230
「ElixirでIoT!!」のこれまでとこれから
takasehideki
0
350
Webからモバイルへ Vue.js × Capacitor 活用事例
naokihaba
0
550
コード書くの好きな人向けAIコーディング活用tips #orestudy
77web
3
300
関数型まつり2025登壇資料「関数プログラミングと再帰」
taisontsukada
2
800
Cursor AI Agentと伴走する アプリケーションの高速リプレイス
daisuketakeda
1
110
WindowInsetsだってテストしたい
ryunen344
1
130
ワイがおすすめする新潟の食 / 20250530phpconf-niigata-eve
kasacchiful
0
300
事業戦略を理解してソフトウェアを設計する
masuda220
PRO
22
6k
Elixir で IoT 開発、 Nerves なら簡単にできる!?
pojiro
1
120
人には人それぞれのサービス層がある
shimabox
3
670
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
231
18k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.6k
Designing for humans not robots
tammielis
253
25k
Adopting Sorbet at Scale
ufuk
77
9.4k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.8k
Fireside Chat
paigeccino
37
3.5k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
60k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
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