Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
My_TDD.pdf
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Masafumi Okura
February 11, 2020
Programming
99
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
My_TDD.pdf
Masafumi Okura
February 11, 2020
More Decks by Masafumi Okura
See All by Masafumi Okura
Ruby for complete beginners
okuramasafumi
1
290
Conference as a communication hub for all of us
okuramasafumi
0
180
Metaprogramming isn't real, it can't hurt you
okuramasafumi
0
200
Developing static sites with Ruby
okuramasafumi
1
490
Why doesn't Ruby have Boolean class - final version
okuramasafumi
0
440
Reading Rails 1.0 Source Code
okuramasafumi
0
400
RDoc meets YARD
okuramasafumi
4
300
Why doesn't Ruby have Boolean class?
okuramasafumi
0
89
My KaigiEffect at RubyKaigi 2025, part 1
okuramasafumi
1
130
Other Decks in Programming
See All in Programming
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
170
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
270
すこし踏み込む CancellationToken
htkym
2
1.7k
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
残高管理から台帳サービスへの進化
artoy
1
200
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
210
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
160
JIS keyboard support in Omarchy
lef237
0
110
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
750
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
270
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
610
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
Featured
See All Featured
Navigating Team Friction
lara
192
16k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3.1k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Designing for Performance
lara
612
70k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
560
sira's awesome portfolio website redesign presentation
elsirapls
0
450
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
600
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
Accessibility Awareness
sabderemane
1
250
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
990
How to build a perfect <img>
jonoalderson
1
6.1k
Design in an AI World
tapps
1
350
Transcript
My TDD Speaker: େխ࢙ Event: େߐށRubyձٞ08 Date: 2020-02-11
ϝλ • εϥΠυຕɿ44ຕ • ൃද࣌ؒɿ20 • σϞɿ༗Γ
okuramasafumi.inspect • ໊લɿେխ࢙ • ॴଐɿϑϦʔϥϯε • ίϛϡχςΟɿGrow.rbओ࠵ɺͦͷଞଟࢀՃ • Rubyྺɿ7 •
झຯɿϓϩάϥϛϯάɺొஃɺᘖᘣɺӳޠ
࣍ 1. My TDD (first part) 2. My gem 3.
My TDD (second part) 4. ࠂ
1. My TDD (first part)
झຯɿϓϩάϥϛϯά
ϓϩάϥϛϯάָ͍͠
Ͱɺଞʹ༠͕ଟ͍
ͦ͜Ͱ…
TDD ➡
TDD ➡ Todan Driven Development
झຯɿొஃ
ࣗͷ࡞ΔιϑτΣΞʹ͍ͭͯൃද͢Δ ͜ͱͰ։ൃʹϓϨογϟʔΛ͔͚Δ
ࠓͷॴͱͯޮՌ͕͋Δ
͜Ε͕ࢲͷTDD
༨ஊɿ ඈߦػ৽װઢͷத࠷ߴͷϓϩάϥϛϯ άڥ
༨ஊͷ༨ஊɿ ࠓطʹ৽װઢʹ1ճͱඈߦػʹ2ճͬ ͍ͯ·͢ɻ͍ͩͿḿΓ·ͨ͠ɻ
͞Βʹ༨ஊɿ ։ൃΛਐΊΔͨΊͷख๏ͱͯ͠ɺTODO͕ ࣌ݶരʹͳΔΑ͏ͳgemΛॻ͍͍ͯΔਓ ͕͍·ͨ͠Ͷʢૉఢʣ
༨ஊऴΘΓ
ࠓ͍͑ͨ͜ͱͦͷұ • ϓϩάϥϛϯάָ͍͠ • ొஃָ͍͠ • Έ߹ΘͤͨΒ࠷ڧͰʁ • ΈΜͳͲΜͲΜొஃͯ͠ͲΜͲΜίʔυॻ͜͏
ͰɺԿΛ࡞͍ͬͯΔΜͰ͔͢ʁ
2. My gem
JSONγϦΞϥΠβΛ࡞͍ͬͯ·͢ɻ
طଘͷJSONγϦΞϥΠβͷ͜ͱ • jbuilderɿ͍ɺDSL݁ߏ͍͠ • ActiveModelSerializersɿϝϯς͞ΕͯΔͷ͔Θ͔Βͳ͍ɺ ෦ߏෳࡶɺ͋·Γ͘ͳ͍ • fast_jsonapiɿ͍͚ͲJSON:APIܗ͔ࣜ͠αϙʔτ͠ͳ͍
γϯϓϧͰɺϝϯς͕؆୯Ͱɺ DSL͕֮͑ͯ͘͢ɺ͍ͦͦ͜͜ɺ JSONγϦΞϥΠβΛ࡞Γ͍ͨʂ
Alba https://github.com/okuramasafumi/alba
0.1.0૬ͷͷ͕Ͱ͖ͨؾ͕͍ͯ͠·͢
ͳͷͰɺϦϦʔε͠·͢
Albaͷػೳʢࠓ࣌ʣ • JSONͷϧʔτΩʔΛઃఆՄೳ • attributesϝιουͰJSONʹؚΊΔଐੑΛෳࢦఆՄೳ • attributeϝιουͰJSONʹؚΊΔଐੑΛϒϩοΫͰࢦఆՄೳ • JSONͷόοΫΤϯυʹOjΛࢦఆՄೳ
ࠓ͍͑ͨ͜ͱͦͷ್ • Alba͍ͬͯ͏gemΛ࡞͍ͬͯ·͢ • ػೳ·ͩશવΓͳ͍͚Ͳɺ͜Ε͔ΒΨγΨγՃ͍ͨ͠ • طଘͷͷʹෆຬ͕͋ΔͳΒ࡞Ε͍͍͡Όͳ͍ • Ճ͖͢ػೳʹ͍ͭͯͷҙݟɺ͓͍ͪͯ͠·͢
ۤ࿑ͨ͠ • ΫϥεϝιουͷDSLͰઃఆͨ͠ใΛΠϯελϯε͔Βࢀর ͢ΔΑ͏ʹ͢ΔΈ • ࣮ޮੑ͕͋Δఔ͋ΔςετΛॻ͘͜ͱ • શମతͳUIͱઃܭ
ςετͱUI
3. My TDD (second part)
طଘͷϥΠϒϥϦʹΛײ͡Δ ≠ ͲΜͳ;͏ʹվળ͢Ε͍͍͔Θ͔Δ
ςετΛॻ͖ͳ͕Β୳͍ͬͯ͘
TDD ➡ Test Driven Development
ࢲͷ࠾༻ͨ͠ํ๏ • ·ͣϢʔεέʔεͷςετΛॻ͘ʢ༷ࡦఆʣ • ͳΜ͔ҧײ͕͋ͬͨΒςετΛॻ͖͢ʢ༷มߋʣ • ςετʹೲಘ͕͍ͬͨΒ࣮͢Δ • ࣮͕ऴΘͬͨΒݸผͷΫϥεͷςετΛޙ͔ΒՃ͢Δʢ࣮ ·ͩॻ͍ͯͳ͍ʣ
ϘτϜΞοϓͰͳ͘τοϓμϯ
͜Ε͕ࢲͷTDD
ࠓ͍͑ͨ͜ͱͦͷࢀ • ༷ͱ͔ɺͲ͏͍͏ΠϯλʔϑΣʔε͕ཧ͔ͳΜͯͦ͏؆୯ ʹΘ͔Βͳ͍ • ϢʔεέʔεΛςετԽͯ͠ɺೲಘߦ͘·Ͱॻ͘ • Ϣχοτςετޙ͚Ͱ͍͍ͷͰ
4. ࠂ
None
https://kaigionrails.org
·ͱΊ • ϓϩάϥϛϯάͱొஃָ͍͠ɺΈ߹ΘͤΔͱͬͱָ͍͠ • Alba͍ͬͯ͏gemɺ࡞ͬͯ·͢ • τοϓμϯͰϢʔεέʔε͔ΒςετΛॻ͘ͱ͍͍͔ • Kaigi on
RailsɺΓ·͢