Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

12. Testing > Test Mode

Test Mode

Up to this point, all the code in this book has been run in development mode. Rails supports three different environments for running applications. Each of them has its own database, as well as its own settings:

Development

Development is the default mode. In development mode, Rails loads and reloads code every time a request is made, making it easy for you to see changes without a cache getting in the way. It’s also typical to use SQLite as the database, as Rails isn’t going to be working at high speed anyway.

Test

Test mode runs like production mode, without reloading code, and has its own database so that tests can run against a consistent database. You could use a fancier database for test mode (and might want to if you suspect strange database interactions), but for getting started, the default of SQLite is fine.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint