Master Ruby on Ruby
  • Prologue
  • README.md
  • Upgrade
  • Upgrade
  • Upgrade a Rails app
  • Rails Structure
    • The Rails code structure
  • Models
  • Action Pack
  • Views
  • Action Text
  • Authentication
    • Session & Cookie
  • Assets Precompile
  • Active Storage
  • Secrets Configuration
  • Generators
  • Rails Utilities
  • Ruby lang
    • Type
    • Constant
    • Class
    • Module
    • Variable 承值容器
    • Symbol
    • Reading Rails' source code
  • Test
  • Database
    • PostgreSQL vs MySQL
  • Tools
    • Container
    • Rack
Powered by GitBook
On this page

Test

Use integration style controller tests over functional style controller tests.

Rails discourages the use of functional tests in favor of integration tests (use ActionDispatch::IntegrationTest).

Integration style controller tests perform actual requests, whereas functional style controller tests merely simulate a request.

New Rails applications no longer generate functional style controller tests and they should only be used for backward compatibility.

PreviousReading Rails' source codeNextDatabase

Last updated 1 year ago