OSDN Git Service

t#31779:element lib
[pettanr/pettanr.git] / config / environments / test.rb
1 require 'element'
2 Pettanr::Application.configure do
3   # Settings specified here will take precedence over those in config/application.rb
4
5   # The test environment is used exclusively to run your application's
6   # test suite.  You never need to work with it otherwise.  Remember that
7   # your test database is "scratch space" for the test suite and is wiped
8   # and recreated between test runs.  Don't rely on the data there!
9   config.cache_classes = true
10
11   # Configure static asset server for tests with Cache-Control for performance
12   config.serve_static_assets = true
13   config.static_cache_control = "public, max-age=3600"
14
15   # Log error messages when you accidentally call methods on nil
16   config.whiny_nils = true
17
18   # Show full error reports and disable caching
19   config.consider_all_requests_local       = true
20   config.action_controller.perform_caching = false
21
22   # Raise exceptions instead of rendering exception templates
23   config.action_dispatch.show_exceptions = false
24
25   # Disable request forgery protection in test environment
26   config.action_controller.allow_forgery_protection    = false
27
28   # Tell Action Mailer not to deliver emails to the real world.
29   # The :test delivery method accumulates sent emails in the
30   # ActionMailer::Base.deliveries array.
31   config.action_mailer.delivery_method = :test
32
33   # Use SQL instead of Active Record's schema dumper when creating the test database.
34   # This is necessary if your schema can't be completely dumped by the schema dumper,
35   # like if you have constraints or database-specific column types
36   # config.active_record.schema_format = :sql
37
38   # Print deprecation notices to the stderr
39   config.active_support.deprecation = :stderr
40 end
41
42 module Pettanr
43   if File.exist? Rails.root + 'config/test_layout'
44     test_layout = 'test'
45   else
46     test_layout = false
47   end
48 end