From 811796a1ba54ed98226895d5b230e9ea92d40e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20M=C3=A1rquez?= Date: Tue, 13 Mar 2018 15:28:17 -0300 Subject: [PATCH] Add capybara configuration to testing.rb (#1340) https://github.com/rails/webpacker/issues/998 --- docs/testing.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/testing.md b/docs/testing.md index 48eb3197c..a21e786f7 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -126,3 +126,12 @@ class HomesTest < ApplicationSystemTestCase end end ``` + +## Capybara setup for Rails +Make sure you configure Rails to serve static files from the public directory in the test environment. + +```rb +# config/environments/test.rb +# Configure public file server for tests with Cache-Control for performance. +config.public_file_server.enabled = true +```