test.rb revision 9f4e199f9ae0b75c01f6a1a3dc49dd137ea16f77
02c335c23bf5fa225a467c19f2c063fb0dc7b8c3Timo SirainenOntohub::Application.configure do
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch # Settings specified here will take precedence over those in config/application.rb
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch # The test environment is used exclusively to run your application's
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch # test suite. You never need to work with it otherwise. Remember that
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch # your test database is "scratch space" for the test suite and is wiped
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch # and recreated between test runs. Don't rely on the data there!
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch config.cache_classes = true
bdd36cfdba3ff66d25570a9ff568d69e1eb543cfTimo Sirainen
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch # Configure static asset server for tests with Cache-Control for performance
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch config.serve_static_assets = true
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch config.static_cache_control = "public, max-age=3600"
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch # Log error messages when you accidentally call methods on nil
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch config.whiny_nils = true
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch # Show full error reports and disable caching
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch config.consider_all_requests_local = true
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch config.action_controller.perform_caching = false
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch # Raise exceptions instead of rendering exception templates
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch config.action_dispatch.show_exceptions = false
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch # Disable request forgery protection in test environment
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch config.action_controller.allow_forgery_protection = false
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch # Tell Action Mailer not to deliver emails to the real world.
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch # The :test delivery method accumulates sent emails in the
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch # ActionMailer::Base.deliveries array.
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch config.action_mailer.delivery_method = :test
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch # Raise exception on mass assignment protection for Active Record models
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch config.active_record.mass_assignment_sanitizer = :strict
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch # Print deprecation notices to the stderr
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch config.active_support.deprecation = :stderr
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Boschend
6ae6496c225238a2c55a8cd96744ad976c44a726Stephan Bosch