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
960
Zeitwerk integration in Rails 6.0
murajun1978
0
100
Efficient development with GraphQL
murajun1978
0
260
Effective Debugging Apps in VS Code
murajun1978
1
840
tebukuro
murajun1978
0
100
Shinosaka.rb #17 Hands on
murajun1978
0
43
New Features in Rails 4.2
murajun1978
0
880
shinosakarb #11 Rails 4 Pattenrs
murajun1978
1
110
Shinosaka.rb #3
murajun1978
0
48
Other Decks in Programming
See All in Programming
Exploring the Gradually Lost Technical Skills in the Cloud Native Era
hwchiu
2
3.9k
CSC307 Lecture 10
javiergs
PRO
0
310
CSC307 Lecture 08
javiergs
PRO
0
330
Webエディタライブラリ 「CodeMirror」から学ぶ Webアプリ開発のテクニック
ryosukeigarashi
0
250
コード生成を伴うLLMエージェント - 2024.07.18 Tokyo AI
smiyawaki0820
11
4.1k
さきがけから振り返るアーキテクチャ刷新 / Reflecting on the Architectural Renewal from the Vanguard
nrslib
2
780
開発部に不満を持っていたCSがエンジニアにジョブチェンしてわかった「勝手に諦めない」ことの大切さ
sakuraikotone
28
16k
GraphQL はいいぞ! ~Laravel で学ぶ GraphQL 入門~
azuki
1
160
CSC307 Lecture 11
javiergs
PRO
0
240
生成AIをkintoneに連携してみた
hideg
0
230
CSC307 Lecture 13
javiergs
PRO
0
150
CSC307 Lecture 09
javiergs
PRO
1
500
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
35
6.3k
Adopting Sorbet at Scale
ufuk
71
8.8k
Designing with Data
zakiwarfel
96
5k
From Idea to $5000 a Month in 5 Months
shpigford
377
46k
A Philosophy of Restraint
colly
200
16k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
13
430
Teambox: Starting and Learning
jrom
130
8.6k
10 Git Anti Patterns You Should be Aware of
lemiorhan
652
58k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
19k
Code Review Best Practice
trishagee
58
16k
Typedesign – Prime Four
hannesfritz
37
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 ͕͑·͢Α( Ŗ`дŖ´)ŝžŕ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ