[Rspec] Efficiently Speed Rspec test


author has deleted

前面 1 ~ 4 點,學習一些技巧和寫法,但是效能提升没特別提到
但文章的第 5 點 Efficiently load data records 得到几个方向

  1. Use let, rather than let!
  2. One is to use before_all instead of before_each in a test file
  3. Another is to have a global variables file, which loads an instance of each record before all tests start
  4. Another approach is to user FactoryBot’s build_stubbed method
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now