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
FactoryGirl LT
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
murajun1978
July 28, 2014
Programming
93
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
FactoryGirl LT
murajun1978
July 28, 2014
More Decks by murajun1978
See All by murajun1978
変化を楽しむエンジニアリング ~ いままでとこれから ~
murajun1978
0
1.3k
How to Enjoy the Murajun’s Style
murajun1978
0
100
Building Tebukuro with Hotwire and Rails
murajun1978
0
1.5k
Zeitwerk integration in Rails 6.0
murajun1978
0
140
Efficient development with GraphQL
murajun1978
0
330
Effective Debugging Apps in VS Code
murajun1978
1
990
tebukuro
murajun1978
0
140
Shinosaka.rb #17 Hands on
murajun1978
0
72
New Features in Rails 4.2
murajun1978
0
960
Other Decks in Programming
See All in Programming
Spec-Driven Development with AI-Agents: From High-Level Requirements to Working Software
antonarhipov
2
480
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.3k
Inside Stream API
skrb
1
680
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
330
RTSPクライアントを自作してみた話
simotin13
0
520
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
520
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
210
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
1.9k
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.2k
TAKTでAI駆動開発の品質を設計する
j5ik2o
6
1.1k
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
13
3.6k
エージェンティックRAGにAWSで入門しよう!
har1101
8
1.4k
Featured
See All Featured
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
62
44k
Un-Boring Meetings
codingconduct
0
310
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
400
WENDY [Excerpt]
tessaabrams
11
38k
How to make the Groovebox
asonas
2
2.2k
Transcript
FactoryGirl Getting Started Guide
WHO @murajun1978 ΉΒ͡ΎΜ
FactoryGirlͬͯΔʁ
fixtures͕͋ΔΜ
100ਓͷςετϢʔβΛ࡞ ͯ͠ΈΑ͏ʂ
seed : 99ߦॻ͍͍ͯͩ͘͞ fixtures : 99ߦॻ͍͍ͯͩ͘͞
FactoryGirl ͜Ε͚ͩʂ
100ճ܁Γฦ͚ͩ͢Ͱ ಉ໊͡લΜ
Faker͕͋ΔΜ Gimei͕͋ΔΜ
FactoryGirlΛ͍͜ͳ͢ᶃ
adminϢʔβΛ࡞Δ
FactoryGirlΛ͍͜ͳ͢ᶄ ͜Ε͚ͩʂ
͍ΖΜͳΈ߹ΘͤΛ࡞Δ
FactoryGirlΛ͍͜ͳ͢ᶅ ͲͬͪͰ͓̺ʂ
has_secure_password ! ύεϫʔυΛઃఆ͢Δ
FactoryGirlΛ͍͜ͳ͢ᶆ
ؔ࿈σʔλҰॹʹ࡞Δ
FactoryGirlΛ͍͜ͳ͢ᶇ
DBΞΫηε͕ଟൃ͠ ςετ͕͘ͳͬͯ͘Δ
FactoryGirlΛ͍͜ͳ͢ᶈ DBʹొ͞Εͳ͍͚Ͳɺ ͪΌΜͱIDΛൃߦͯ͘͠ΕΔ
FactoryGirlΛ͍͜ͳ͢ᶉ ͜ΕΛՃ
ίϐʔָͪΜͩΑͶ Ͱ͞ɻɻɻ
Don't Repeat Yourself!
ͪͳΈʹ seedͰrequire͢ΕFactoryGirl ͕͑·͢Α( Ŗ`дŖ´)ŝžŕ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ