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
1k
Zeitwerk integration in Rails 6.0
murajun1978
0
100
Efficient development with GraphQL
murajun1978
0
270
Effective Debugging Apps in VS Code
murajun1978
1
850
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
50
Other Decks in Programming
See All in Programming
DjangoNinjaで高速なAPI開発を実現する
masaya00
0
430
Findy - エンジニア向け会社紹介 / Findy Letter for Engineers
findyinc
4
93k
Infrastructure as Code でセキュリティを楽にしよう!
konokenj
5
1.4k
AWS Lambda Web Adapterを活用する新しいサーバーレスの実装パターン
tmokmss
6
5.4k
CDKを活用した 大規模コンテナ移行 プロジェクトの紹介
yoyoyopg
0
230
Go製CLIツールGatling Commanderによる負荷試験実施の自動化
okmtz
3
650
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
6
220
pytest プラグインを開発して DRY に自動テストを書こう
inuatsu
2
240
MLOps in Mercari Group’s Trust and Safety ML Team
cjhj
1
100
Делим тесты между QA и разработчиком
mariyasaygina
0
470
AWS認定資格を受験するにあたり、気づいたこと・実践していたことのまとめ
satoshi256kbyte
1
120
CSC509 Lecture 01
javiergs
PRO
1
200
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
The Invisible Customer
myddelton
119
13k
Thoughts on Productivity
jonyablonski
67
4.2k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
23
1.7k
Debugging Ruby Performance
tmm1
73
12k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
38
2.1k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Code Review Best Practice
trishagee
62
16k
Why Our Code Smells
bkeepers
PRO
334
57k
Become a Pro
speakerdeck
PRO
24
4.9k
Docker and Python
trallard
40
3k
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 ͕͑·͢Α( Ŗ`дŖ´)ŝžŕ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ