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
murajun1978
July 28, 2014
Programming
1
72
FactoryGirl LT
murajun1978
July 28, 2014
Tweet
Share
More Decks by murajun1978
See All by murajun1978
変化を楽しむエンジニアリング ~ いままでとこれから ~
murajun1978
0
850
How to Enjoy the Murajun’s Style
murajun1978
0
65
Building Tebukuro with Hotwire and Rails
murajun1978
0
1.4k
Zeitwerk integration in Rails 6.0
murajun1978
0
120
Efficient development with GraphQL
murajun1978
0
310
Effective Debugging Apps in VS Code
murajun1978
1
920
tebukuro
murajun1978
0
120
Shinosaka.rb #17 Hands on
murajun1978
0
55
New Features in Rails 4.2
murajun1978
0
930
Other Decks in Programming
See All in Programming
あなたとKaigi on Rails / Kaigi on Rails + You
shimoju
0
160
Things You Thought You Didn’t Need To Care About That Have a Big Impact On Your Job
hollycummins
0
230
kiroとCodexで最高のSpec駆動開発を!!数時間で web3ネイティブなミニゲームを作ってみたよ!
mashharuki
0
620
「ちょっと古いから」って避けてた技術書、今だからこそ読もう
mottyzzz
11
6.8k
理論と実務のギャップを超える
eycjur
0
140
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
410
Le côté obscur des IA génératives
pascallemerrer
0
150
TFLintカスタムプラグインで始める Terraformコード品質管理
bells17
2
200
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
190
2分台で1500examples完走!爆速CIを支える環境構築術 - Kaigi on Rails 2025
falcon8823
3
3.7k
Writing Better Go: Lessons from 10 Code Reviews
konradreiche
0
1.3k
デミカツ切り抜きで面倒くさいことはPythonにやらせよう
aokswork3
0
250
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
BBQ
matthewcrist
89
9.8k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
The Cost Of JavaScript in 2023
addyosmani
55
9k
Building Adaptive Systems
keathley
44
2.8k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
jQuery: Nuts, Bolts and Bling
dougneiner
65
7.9k
Unsuck your backbone
ammeep
671
58k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
Reflections from 52 weeks, 52 projects
jeffersonlam
353
21k
Building Better People: How to give real-time feedback that sticks.
wjessup
369
20k
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 ͕͑·͢Α( Ŗ`дŖ´)ŝžŕ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ