test.rb 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #---
  2. # Excerpted from "Agile Web Development with Rails",
  3. # published by The Pragmatic Bookshelf.
  4. # Copyrights apply to this code. It may not be used to create training material,
  5. # courses, books, articles, and the like. Contact us if you are in doubt.
  6. # We make no guarantees that this code is fit for any purpose.
  7. # Visit http://www.pragmaticprogrammer.com/titles/rails4 for more book information.
  8. #---
  9. #---
  10. # Excerpted from "Agile Web Development with Rails, 4rd Ed.",
  11. # published by The Pragmatic Bookshelf.
  12. # Copyrights apply to this code. It may not be used to create training material,
  13. # courses, books, articles, and the like. Contact us if you are in doubt.
  14. # We make no guarantees that this code is fit for any purpose.
  15. # Visit http://www.pragmaticprogrammer.com/titles/rails4 for more book information.
  16. #---
  17. # Settings specified here will take precedence over those in config/environment.rb
  18. # The test environment is used exclusively to run your application's
  19. # test suite. You never need to work with it otherwise. Remember that
  20. # your test database is "scratch space" for the test suite and is wiped
  21. # and recreated between test runs. Don't rely on the data there!
  22. config.cache_classes = true
  23. # Log error messages when you accidentally call methods on nil.
  24. config.whiny_nils = true
  25. # Show full error reports and disable caching
  26. config.action_controller.consider_all_requests_local = true
  27. config.action_controller.perform_caching = false
  28. # Disable request forgery protection in test environment
  29. config.action_controller.allow_forgery_protection = false
  30. # Tell Action Mailer not to deliver emails to the real world.
  31. # The :test delivery method accumulates sent emails in the
  32. # ActionMailer::Base.deliveries array.
  33. config.action_mailer.delivery_method = :test
  34. # Use SQL instead of Active Record's schema dumper when creating the test database.
  35. # This is necessary if your schema can't be completely dumped by the schema dumper,
  36. # like if you have constraints or database-specific column types
  37. # config.active_record.schema_format = :sql