site

Website's source files.
git clone git://git.ryanmj.xyz/site.git
Log | Files | Refs | LICENSE

test.rb (2387B)


      1 require "active_support/core_ext/integer/time"
      2 
      3 # The test environment is used exclusively to run your application's
      4 # test suite. You never need to work with it otherwise. Remember that
      5 # your test database is "scratch space" for the test suite and is wiped
      6 # and recreated between test runs. Don't rely on the data there!
      7 
      8 Rails.application.configure do
      9   # Settings specified here will take precedence over those in config/application.rb.
     10 
     11   # Turn false under Spring and add config.action_view.cache_template_loading = true.
     12   config.cache_classes = true
     13 
     14   # Eager loading loads your whole application. When running a single test locally,
     15   # this probably isn't necessary. It's a good idea to do in a continuous integration
     16   # system, or in some way before deploying your code.
     17   config.eager_load = ENV["CI"].present?
     18 
     19   # Configure public file server for tests with Cache-Control for performance.
     20   config.public_file_server.enabled = true
     21   config.public_file_server.headers = {
     22     "Cache-Control" => "public, max-age=#{1.hour.to_i}"
     23   }
     24 
     25   # Show full error reports and disable caching.
     26   config.consider_all_requests_local       = true
     27   config.action_controller.perform_caching = false
     28   config.cache_store = :null_store
     29 
     30   # Raise exceptions instead of rendering exception templates.
     31   config.action_dispatch.show_exceptions = false
     32 
     33   # Disable request forgery protection in test environment.
     34   config.action_controller.allow_forgery_protection = false
     35 
     36   # Store uploaded files on the local file system in a temporary directory.
     37   config.active_storage.service = :test
     38 
     39   config.action_mailer.perform_caching = false
     40 
     41   # Tell Action Mailer not to deliver emails to the real world.
     42   # The :test delivery method accumulates sent emails in the
     43   # ActionMailer::Base.deliveries array.
     44   config.action_mailer.delivery_method = :test
     45 
     46   # Print deprecation notices to the stderr.
     47   config.active_support.deprecation = :stderr
     48 
     49   # Raise exceptions for disallowed deprecations.
     50   config.active_support.disallowed_deprecation = :raise
     51 
     52   # Tell Active Support which deprecation messages to disallow.
     53   config.active_support.disallowed_deprecation_warnings = []
     54 
     55   # Raises error for missing translations.
     56   # config.i18n.raise_on_missing_translations = true
     57 
     58   # Annotate rendered view with file names.
     59   # config.action_view.annotate_rendered_view_with_filenames = true
     60 end