Skip to content

Commit 9cb11b7

Browse files
committed
Update cache control conditional for Rails >= 5
1 parent 3fdf537 commit 9cb11b7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • spec/dummy/config/environments

spec/dummy/config/environments/test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414

1515
# Configure static file server for tests with Cache-Control for performance.
1616
if Rails.version.start_with?("4")
17-
config.public_file_server.enabled = true
18-
config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }
19-
else
2017
config.serve_static_files = true
2118
config.static_cache_control = 'public, max-age=3600'
19+
else
20+
config.public_file_server.enabled = true
21+
config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }
2222
end
2323

2424
# Show full error reports and disable caching.

0 commit comments

Comments
 (0)