spec/rails_app/config/environments/test.rb in audited-4.2.2 vs spec/rails_app/config/environments/test.rb in audited-4.3.0
- old
+ new
@@ -10,14 +10,17 @@
# Do not eager load code on boot. This avoids loading your whole application
# just for the purpose of running a single test. If you are using a tool that
# preloads Rails for running tests, you may have to set it to true.
config.eager_load = false
- # Configure static asset server for tests with Cache-Control for performance.
- config.serve_static_assets = true
# Configure static file server for tests with Cache-Control for performance.
- config.serve_static_files = true
- config.static_cache_control = 'public, max-age=3600'
+ if config.respond_to?(:public_file_server)
+ config.public_file_server.enabled = true
+ config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }
+ else
+ config.static_cache_control = 'public, max-age=3600'
+ config.serve_static_files = true
+ end
# Show full error reports and disable caching.
config.consider_all_requests_local = true
# config.action_controller.perform_caching = false