github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/examples/ruby/rideshare_rails/config/environments/test.rb (about)

     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    # Print deprecation notices to the stderr.
    37    config.active_support.deprecation = :stderr
    38  
    39    # Raise exceptions for disallowed deprecations.
    40    config.active_support.disallowed_deprecation = :raise
    41  
    42    # Tell Active Support which deprecation messages to disallow.
    43    config.active_support.disallowed_deprecation_warnings = []
    44  
    45    # Raises error for missing translations.
    46    # config.i18n.raise_on_missing_translations = true
    47  
    48    # Annotate rendered view with file names.
    49    # config.action_view.annotate_rendered_view_with_filenames = true
    50  end