Problem
cache_varies_integration_test.rb fails under Rails 7.2 + Rack 2.x pin with:
NameError: uninitialized constant Rack::Cache
test/integration/workarea/cache_varies_integration_test.rb:55:in `block in app'
Root Cause
Under Rails 7.2 with rack ~> 2.2 pinned (required for serviceworker-rails compatibility), the rack-cache gem's Rack::Cache class is not auto-required. The test builds a Rack::Builder stack that directly references Rack::Cache without an explicit require.
Fix
Add require 'rack/cache' to the test file or test_helper.rb to ensure Rack::Cache is available when running under Rails 7.2.
Observed in
Rails 7.2 test suite appraisal (issue #768).
Client Impact: None (test infrastructure only)
Problem
cache_varies_integration_test.rbfails under Rails 7.2 + Rack 2.x pin with:Root Cause
Under Rails 7.2 with
rack ~> 2.2pinned (required for serviceworker-rails compatibility), therack-cachegem'sRack::Cacheclass is not auto-required. The test builds aRack::Builderstack that directly referencesRack::Cachewithout an explicit require.Fix
Add
require 'rack/cache'to the test file ortest_helper.rbto ensureRack::Cacheis available when running under Rails 7.2.Observed in
Rails 7.2 test suite appraisal (issue #768).
Client Impact: None (test infrastructure only)