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
66
FactoryGirl LT
murajun1978
July 28, 2014
Tweet
Share
More Decks by murajun1978
See All by murajun1978
Building Tebukuro with Hotwire and Rails
murajun1978
0
1.1k
Zeitwerk integration in Rails 6.0
murajun1978
0
100
Efficient development with GraphQL
murajun1978
0
280
Effective Debugging Apps in VS Code
murajun1978
1
860
tebukuro
murajun1978
0
110
Shinosaka.rb #17 Hands on
murajun1978
0
43
New Features in Rails 4.2
murajun1978
0
890
shinosakarb #11 Rails 4 Pattenrs
murajun1978
1
110
Shinosaka.rb #3
murajun1978
0
51
Other Decks in Programming
See All in Programming
みんなでプロポーザルを書いてみた
yuriko1211
0
170
JavaでLチカしたい! / JJUG CCC 2024 Fall LT
nhayato
0
110
EventSourcingの理想と現実
wenas
6
2.2k
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
270
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
430
Kaigi on Rails 2024 - Rails APIモードのためのシンプルで効果的なCSRF対策 / kaigionrails-2024-csrf
corocn
5
3.7k
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.2k
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
400
Hotwire or React? ~Reactの録画機能をHotwireに置き換えて得られた知見~ / hotwire_or_react
harunatsujita
8
5k
CSC509 Lecture 09
javiergs
PRO
0
140
C++でシェーダを書く
fadis
6
3.9k
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
4
540
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
231
17k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
505
140k
For a Future-Friendly Web
brad_frost
175
9.4k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
42
2.2k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
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 ͕͑·͢Α( Ŗ`дŖ´)ŝžŕ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ