โ† Ruby on Rails learning path
Ruby on Rails ยท Module 10 of 10

Testing and deploying Rails

Ship a tested Rails app to production.

๐Ÿ“– Key ideas

  1. Rails includes Minitest; many teams use RSpec.
  2. Model, request and system tests cover different layers.
  3. Fixtures or FactoryBot create test data.
  4. Rails 8 uses Kamal to deploy containers to any server.
  5. Run bin/rails assets:precompile and migrations during deploy; watch logs after.
๐Ÿ’ก Real-life example: Like a final rehearsal before the annual day: tests rehearse every scene, and deploy is opening night.
System testBrowser-driven end-to-end test
FactoryBotBuilds test records
KamalRails 8 container deploy tool
Request testTests a controller over HTTP