From b2a66732cf4a1b06f31a25371822364a60e25111 Mon Sep 17 00:00:00 2001 From: Juanito Fatas Date: Wed, 31 Dec 2014 11:35:18 +0800 Subject: [PATCH] Suppress test.rb config warning for Rails 4.2. --- test/rails_app/config/environments/test.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/rails_app/config/environments/test.rb b/test/rails_app/config/environments/test.rb index b9feca88..536b4f09 100644 --- a/test/rails_app/config/environments/test.rb +++ b/test/rails_app/config/environments/test.rb @@ -12,8 +12,13 @@ RailsApp::Application.configure do # 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 + # Disable serving static files from the `/public` folder by default since + # Apache or NGINX already handles this. + if Rails.version >= "4.2.0" + config.serve_static_files = true + else + config.serve_static_assets = true + end config.static_cache_control = "public, max-age=3600" # Show full error reports and disable caching.